From 56e6f512fc284c2ec2945c99c6d818e14c20d6b4 Mon Sep 17 00:00:00 2001 From: Benoit Marty <benoit@matrix.org> Date: Mon, 13 Jun 2022 16:38:07 +0200 Subject: [PATCH] Rename setting key for clarity --- .../java/im/vector/app/features/settings/VectorPreferences.kt | 2 +- .../VectorSettingsNotificationPreferenceFragment.kt | 4 ++-- vector/src/main/res/xml/vector_settings_notifications.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt b/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt index 1b61eb9bcf..276317b557 100755 --- a/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt @@ -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" diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsNotificationPreferenceFragment.kt index fa82cc12d3..62f5823b65 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsNotificationPreferenceFragment.kt @@ -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 { diff --git a/vector/src/main/res/xml/vector_settings_notifications.xml b/vector/src/main/res/xml/vector_settings_notifications.xml index 6ca2811a72..f4d7ff8cd5 100644 --- a/vector/src/main/res/xml/vector_settings_notifications.xml +++ b/vector/src/main/res/xml/vector_settings_notifications.xml @@ -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" />