Renaming v2 setting key

This commit is contained in:
Maxime NATUREL 2022-08-10 10:53:34 +02:00
parent ed00685514
commit b9fa4ddfc8
3 changed files with 7 additions and 7 deletions

View File

@ -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"

View File

@ -137,8 +137,8 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
findPreference<VectorPreference>(VectorPreferences.SETTINGS_SHOW_DEVICES_LIST_PREFERENCE_KEY)!!
}
private val showDevicesV2ListPref by lazy {
findPreference<VectorPreference>(VectorPreferences.SETTINGS_SHOW_DEVICES_V2_LIST_PREFERENCE_KEY)!!
private val showDevicesListV2Pref by lazy {
findPreference<VectorPreference>(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

View File

@ -63,7 +63,7 @@
app:fragment="im.vector.app.features.settings.devices.VectorSettingsDevicesFragment" />
<im.vector.app.core.preference.VectorPreference
android:key="SETTINGS_SHOW_DEVICES_V2_LIST_PREFERENCE_KEY"
android:key="SETTINGS_SHOW_DEVICES_LIST_V2_PREFERENCE_KEY"
android:title="@string/settings_active_sessions_show_all"
app:fragment="im.vector.app.features.settings.devices.v2.VectorSettingsDevicesFragment" />