mirror of
https://github.com/etesync/android
synced 2024-11-15 20:38:58 +00:00
Account Settings: add a flag to check if legacy (and use in account page).
This commit is contained in:
parent
90cc39deeb
commit
09c932c02c
@ -77,6 +77,9 @@ constructor(internal val context: Context, internal val account: Account) {
|
||||
get() = accountManager.getUserData(account, KEY_ETEBASE_SESSION)
|
||||
set(value) = accountManager.setUserData(account, KEY_ETEBASE_SESSION, value)
|
||||
|
||||
val isLegacy: Boolean
|
||||
get() = authToken != null
|
||||
|
||||
// CalDAV settings
|
||||
|
||||
var manageCalendarColors: Boolean
|
||||
|
@ -87,6 +87,7 @@ class AccountActivity : BaseActivity(), Toolbar.OnMenuItemClickListener, PopupMe
|
||||
|
||||
account = intent.getParcelableExtra(EXTRA_ACCOUNT)
|
||||
title = account.name
|
||||
val settings = AccountSettings(this, account)
|
||||
|
||||
setContentView(R.layout.activity_account)
|
||||
|
||||
@ -131,8 +132,10 @@ class AccountActivity : BaseActivity(), Toolbar.OnMenuItemClickListener, PopupMe
|
||||
HintManager.setHintSeen(this, HINT_VIEW_COLLECTION, true)
|
||||
}
|
||||
|
||||
if (!SetupUserInfoFragment.hasUserInfo(this, account)) {
|
||||
SetupUserInfoFragment.newInstance(account).show(supportFragmentManager, null)
|
||||
if (settings.isLegacy) {
|
||||
if (!SetupUserInfoFragment.hasUserInfo(this, account)) {
|
||||
SetupUserInfoFragment.newInstance(account).show(supportFragmentManager, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user