mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 06:28:45 +03:00
Merge pull request #7375 from vector-im/feature/mna/device-manager-go-to-new-screen
[Device Management] Redirect to the new screen everywhere when lab flag is on
This commit is contained in:
commit
36e5166051
2 changed files with 11 additions and 2 deletions
1
changelog.d/7374.feature
Normal file
1
changelog.d/7374.feature
Normal file
|
@ -0,0 +1 @@
|
||||||
|
[Device Management] Redirect to the new screen everywhere when lab flag is on
|
|
@ -63,6 +63,8 @@ class VectorSettingsActivity : VectorBaseActivity<ActivityVectorSettingsBinding>
|
||||||
|
|
||||||
@Inject lateinit var session: Session
|
@Inject lateinit var session: Session
|
||||||
|
|
||||||
|
@Inject lateinit var vectorPreferences: VectorPreferences
|
||||||
|
|
||||||
override fun initUiAndData() {
|
override fun initUiAndData() {
|
||||||
setupToolbar(views.settingsToolbar)
|
setupToolbar(views.settingsToolbar)
|
||||||
.allowBack()
|
.allowBack()
|
||||||
|
@ -77,13 +79,19 @@ class VectorSettingsActivity : VectorBaseActivity<ActivityVectorSettingsBinding>
|
||||||
replaceFragment(views.vectorSettingsPage, VectorSettingsAdvancedSettingsFragment::class.java, null, FRAGMENT_TAG)
|
replaceFragment(views.vectorSettingsPage, VectorSettingsAdvancedSettingsFragment::class.java, null, FRAGMENT_TAG)
|
||||||
SettingsActivityPayload.SecurityPrivacy ->
|
SettingsActivityPayload.SecurityPrivacy ->
|
||||||
replaceFragment(views.vectorSettingsPage, VectorSettingsSecurityPrivacyFragment::class.java, null, FRAGMENT_TAG)
|
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(
|
replaceFragment(
|
||||||
views.vectorSettingsPage,
|
views.vectorSettingsPage,
|
||||||
VectorSettingsDevicesFragment::class.java,
|
fragmentClass,
|
||||||
null,
|
null,
|
||||||
FRAGMENT_TAG
|
FRAGMENT_TAG
|
||||||
)
|
)
|
||||||
|
}
|
||||||
SettingsActivityPayload.Notifications -> {
|
SettingsActivityPayload.Notifications -> {
|
||||||
requestHighlightPreferenceKeyOnResume(VectorPreferences.SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY)
|
requestHighlightPreferenceKeyOnResume(VectorPreferences.SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY)
|
||||||
replaceFragment(views.vectorSettingsPage, VectorSettingsNotificationPreferenceFragment::class.java, null, FRAGMENT_TAG)
|
replaceFragment(views.vectorSettingsPage, VectorSettingsNotificationPreferenceFragment::class.java, null, FRAGMENT_TAG)
|
||||||
|
|
Loading…
Reference in a new issue