Rename setting key for clarity

This commit is contained in:
Benoit Marty 2022-06-13 16:38:07 +02:00
parent d1e2a903b4
commit 56e6f512fc
3 changed files with 4 additions and 4 deletions

View file

@ -142,7 +142,7 @@ class VectorPreferences @Inject constructor(
const val SETTINGS_SET_SYNC_DELAY_PREFERENCE_KEY = "SETTINGS_SET_SYNC_DELAY_PREFERENCE_KEY"
// notification method
const val SETTINGS_UNIFIED_PUSH_RE_REGISTER_KEY = "SETTINGS_UNIFIED_PUSH_RE_REGISTER_KEY"
const val SETTINGS_NOTIFICATION_METHOD_KEY = "SETTINGS_NOTIFICATION_METHOD_KEY"
// Calls
const val SETTINGS_CALL_PREVENT_ACCIDENTAL_CALL_KEY = "SETTINGS_CALL_PREVENT_ACCIDENTAL_CALL_KEY"

View file

@ -103,7 +103,7 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor(
if (isChecked) {
unifiedPushHelper.register(requireActivity()) {
// Update the summary
findPreference<VectorPreference>(VectorPreferences.SETTINGS_UNIFIED_PUSH_RE_REGISTER_KEY)
findPreference<VectorPreference>(VectorPreferences.SETTINGS_NOTIFICATION_METHOD_KEY)
?.summary = unifiedPushHelper.getCurrentDistributorName()
}
} else {
@ -151,7 +151,7 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor(
}
}
findPreference<VectorPreference>(VectorPreferences.SETTINGS_UNIFIED_PUSH_RE_REGISTER_KEY)?.let {
findPreference<VectorPreference>(VectorPreferences.SETTINGS_NOTIFICATION_METHOD_KEY)?.let {
if (vectorFeatures.allowExternalUnifiedPushDistributors()) {
it.summary = unifiedPushHelper.getCurrentDistributorName()
it.onPreferenceClickListener = Preference.OnPreferenceClickListener {

View file

@ -53,7 +53,7 @@
<im.vector.app.core.preference.VectorPreference
android:dependency="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
android:key="SETTINGS_UNIFIED_PUSH_RE_REGISTER_KEY"
android:key="SETTINGS_NOTIFICATION_METHOD_KEY"
android:persistent="false"
android:title="@string/settings_notification_method" />