Add summary to the notification with the current value.

This commit is contained in:
Benoit Marty 2022-06-01 17:28:01 +02:00 committed by Benoit Marty
parent 76bc6a5e0a
commit 3f6b5292d4

View file

@ -148,11 +148,13 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor(
findPreference<VectorPreference>(VectorPreferences.SETTINGS_UNIFIED_PUSH_RE_REGISTER_KEY)?.let {
if (BuildConfig.ALLOW_EXTERNAL_UNIFIEDPUSH_DISTRIB) {
it.summary = unifiedPushHelper.getCurrentDistributorName()
it.onPreferenceClickListener = Preference.OnPreferenceClickListener {
unifiedPushHelper.reRegister(
requireActivity(),
pushersManager
) {
it.summary = unifiedPushHelper.getCurrentDistributorName()
session.pushersService().refreshPushers()
refreshBackgroundSyncPrefs()
}