From b9fa4ddfc8dbdfad7afb50cba4eb8d3e08fa60b6 Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Wed, 10 Aug 2022 10:53:34 +0200 Subject: [PATCH] Renaming v2 setting key --- .../vector/app/features/settings/VectorPreferences.kt | 2 +- .../settings/VectorSettingsSecurityPrivacyFragment.kt | 10 +++++----- .../main/res/xml/vector_settings_security_privacy.xml | 2 +- 3 files changed, 7 insertions(+), 7 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 0134fc581b..857d2ce7fb 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 @@ -74,7 +74,7 @@ class VectorPreferences @Inject constructor( const val SETTINGS_ENCRYPTION_IMPORT_E2E_ROOM_KEYS_PREFERENCE_KEY = "SETTINGS_ENCRYPTION_IMPORT_E2E_ROOM_KEYS_PREFERENCE_KEY" const val SETTINGS_ENCRYPTION_NEVER_SENT_TO_PREFERENCE_KEY = "SETTINGS_ENCRYPTION_NEVER_SENT_TO_PREFERENCE_KEY" const val SETTINGS_SHOW_DEVICES_LIST_PREFERENCE_KEY = "SETTINGS_SHOW_DEVICES_LIST_PREFERENCE_KEY" - const val SETTINGS_SHOW_DEVICES_V2_LIST_PREFERENCE_KEY = "SETTINGS_SHOW_DEVICES_V2_LIST_PREFERENCE_KEY" + const val SETTINGS_SHOW_DEVICES_LIST_V2_PREFERENCE_KEY = "SETTINGS_SHOW_DEVICES_LIST_V2_PREFERENCE_KEY" const val SETTINGS_ALLOW_INTEGRATIONS_KEY = "SETTINGS_ALLOW_INTEGRATIONS_KEY" const val SETTINGS_INTEGRATION_MANAGER_UI_URL_KEY = "SETTINGS_INTEGRATION_MANAGER_UI_URL_KEY" const val SETTINGS_SECURE_MESSAGE_RECOVERY_PREFERENCE_KEY = "SETTINGS_SECURE_MESSAGE_RECOVERY_PREFERENCE_KEY" diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt index 023bb9e03f..24ad4e55ab 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt @@ -137,8 +137,8 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor( findPreference(VectorPreferences.SETTINGS_SHOW_DEVICES_LIST_PREFERENCE_KEY)!! } - private val showDevicesV2ListPref by lazy { - findPreference(VectorPreferences.SETTINGS_SHOW_DEVICES_V2_LIST_PREFERENCE_KEY)!! + private val showDevicesListV2Pref by lazy { + findPreference(VectorPreferences.SETTINGS_SHOW_DEVICES_LIST_V2_PREFERENCE_KEY)!! } // encrypt to unverified devices @@ -552,9 +552,9 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor( showDeviceListPref.isEnabled = devices.isNotEmpty() showDeviceListPref.summary = resources.getQuantityString(R.plurals.settings_active_sessions_count, devices.size, devices.size) - showDevicesV2ListPref.isVisible = vectorFeatures.isNewDeviceManagementEnabled() - showDevicesV2ListPref.title = showDeviceListPref.title.toString() + " (V2, WIP)" - showDevicesV2ListPref.summary = resources.getQuantityString(R.plurals.settings_active_sessions_count, devices.size, devices.size) + showDevicesListV2Pref.isVisible = vectorFeatures.isNewDeviceManagementEnabled() + showDevicesListV2Pref.title = showDeviceListPref.title.toString() + " (V2, WIP)" + showDevicesListV2Pref.summary = resources.getQuantityString(R.plurals.settings_active_sessions_count, devices.size, devices.size) val userId = session.myUserId val deviceId = session.sessionParams.deviceId diff --git a/vector/src/main/res/xml/vector_settings_security_privacy.xml b/vector/src/main/res/xml/vector_settings_security_privacy.xml index b5b21bc017..c246a40f71 100644 --- a/vector/src/main/res/xml/vector_settings_security_privacy.xml +++ b/vector/src/main/res/xml/vector_settings_security_privacy.xml @@ -63,7 +63,7 @@ app:fragment="im.vector.app.features.settings.devices.VectorSettingsDevicesFragment" />