diff --git a/changelog.d/7374.feature b/changelog.d/7374.feature new file mode 100644 index 0000000000..aa10696dca --- /dev/null +++ b/changelog.d/7374.feature @@ -0,0 +1 @@ +[Device Management] Redirect to the new screen everywhere when lab flag is on diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsActivity.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsActivity.kt index 9a84412482..dcf8e7b3ae 100755 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsActivity.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsActivity.kt @@ -63,6 +63,8 @@ class VectorSettingsActivity : VectorBaseActivity @Inject lateinit var session: Session + @Inject lateinit var vectorPreferences: VectorPreferences + override fun initUiAndData() { setupToolbar(views.settingsToolbar) .allowBack() @@ -77,13 +79,19 @@ class VectorSettingsActivity : VectorBaseActivity replaceFragment(views.vectorSettingsPage, VectorSettingsAdvancedSettingsFragment::class.java, null, FRAGMENT_TAG) SettingsActivityPayload.SecurityPrivacy -> replaceFragment(views.vectorSettingsPage, VectorSettingsSecurityPrivacyFragment::class.java, null, FRAGMENT_TAG) - SettingsActivityPayload.SecurityPrivacyManageSessions -> + SettingsActivityPayload.SecurityPrivacyManageSessions -> { + val fragmentClass = if (vectorPreferences.isNewSessionManagerEnabled()) { + im.vector.app.features.settings.devices.v2.VectorSettingsDevicesFragment::class.java + } else { + VectorSettingsDevicesFragment::class.java + } replaceFragment( views.vectorSettingsPage, - VectorSettingsDevicesFragment::class.java, + fragmentClass, null, FRAGMENT_TAG ) + } SettingsActivityPayload.Notifications -> { requestHighlightPreferenceKeyOnResume(VectorPreferences.SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY) replaceFragment(views.vectorSettingsPage, VectorSettingsNotificationPreferenceFragment::class.java, null, FRAGMENT_TAG)