open global settings from room settings

This commit is contained in:
Valere 2022-10-03 14:22:13 +02:00
parent f7d8356327
commit 8c7e7a8f35
2 changed files with 7 additions and 0 deletions

View File

@ -56,6 +56,7 @@ class RoomSettingsController @Inject constructor(
fun onJoinRuleClicked()
fun onToggleGuestAccess()
fun setEncryptedToVerifiedDevicesOnly(enabled: Boolean)
fun openGlobalBlockSettings()
}
var callback: Callback? = null
@ -170,6 +171,7 @@ class RoomSettingsController @Inject constructor(
}.toEpoxyCharSequence()
)
itemClickAction {
host.callback?.openGlobalBlockSettings()
}
}
} else {

View File

@ -43,6 +43,7 @@ import im.vector.app.core.utils.toast
import im.vector.app.databinding.FragmentRoomSettingGenericBinding
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.home.AvatarRenderer
import im.vector.app.features.navigation.SettingsActivityPayload
import im.vector.app.features.roomprofile.RoomProfileArgs
import im.vector.app.features.roomprofile.RoomProfileSharedActionViewModel
import im.vector.app.features.roomprofile.settings.historyvisibility.RoomHistoryVisibilityBottomSheet
@ -203,6 +204,10 @@ class RoomSettingsFragment :
viewModel.handle(RoomSettingsAction.SetEncryptToVerifiedDeviceOnly(enabled))
}
override fun openGlobalBlockSettings() {
navigator.openSettings(requireContext(), SettingsActivityPayload.SecurityPrivacy)
}
override fun onImageReady(uri: Uri?) {
uri ?: return
viewModel.handle(