Skip widget permissions for element call.

This commit is contained in:
Onuray Sahin 2022-07-06 14:54:24 +03:00
parent cea7193c48
commit 75ab0aef53

View File

@ -87,6 +87,12 @@ class WidgetActivity : VectorBaseActivity<ActivityWidgetBinding>() {
}
}
// Trust element call widget by default
if (widgetArgs.kind == WidgetKind.ELEMENT_CALL) {
if (supportFragmentManager.findFragmentByTag(WIDGET_FRAGMENT_TAG) == null) {
addFragment(views.fragmentContainer, WidgetFragment::class.java, widgetArgs, WIDGET_FRAGMENT_TAG)
}
} else {
permissionViewModel.observeViewEvents {
when (it) {
is RoomWidgetPermissionViewEvents.Close -> finish()
@ -114,6 +120,7 @@ class WidgetActivity : VectorBaseActivity<ActivityWidgetBinding>() {
}
}
}
}
viewModel.onEach(WidgetViewState::widgetName) { name ->
supportActionBar?.title = name