1
0
Fork 0

Reflect current sync status when opening account settings

master
Grisha Kruglov 2019-07-26 00:25:12 -07:00 committed by Grisha Kruglov
parent f89cefe92c
commit 210864186b
1 changed files with 8 additions and 0 deletions

View File

@ -98,6 +98,14 @@ class AccountSettingsFragment : PreferenceFragmentCompat() {
preferenceSyncNow?.let {
it.onPreferenceClickListener = getClickListenerForSyncNow()
updateLastSyncedTimePref(context!!, it)
// Current sync state
if (requireComponents.backgroundServices.accountManager.isSyncActive()) {
it.title = getString(R.string.sync_syncing_in_progress)
it.isEnabled = false
} else {
it.isEnabled = true
}
}
// Device Name