Refresh push pref after diagnostic

This commit is contained in:
Benoit Marty 2020-09-11 11:49:14 +02:00
parent 2ed7be243b
commit b26d379d20
1 changed files with 12 additions and 2 deletions

View File

@ -244,6 +244,16 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor(
val preference = findPreference<VectorSwitchPreference>(key)
preference?.isHighlighted = true
}
refreshPref()
}
private fun refreshPref() {
// This pref may have change from troubleshoot pref fragment
if (!FcmHelper.isPushSupported()) {
findPreference<VectorSwitchPreference>(VectorPreferences.SETTINGS_START_ON_BOOT_PREFERENCE_KEY)
?.isChecked = vectorPreferences.autoStartOnBoot()
}
}
override fun onAttach(context: Context) {