Skip widget permissions for element call.
This commit is contained in:
parent
cea7193c48
commit
75ab0aef53
@ -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 {
|
permissionViewModel.observeViewEvents {
|
||||||
when (it) {
|
when (it) {
|
||||||
is RoomWidgetPermissionViewEvents.Close -> finish()
|
is RoomWidgetPermissionViewEvents.Close -> finish()
|
||||||
@ -114,6 +120,7 @@ class WidgetActivity : VectorBaseActivity<ActivityWidgetBinding>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
viewModel.onEach(WidgetViewState::widgetName) { name ->
|
viewModel.onEach(WidgetViewState::widgetName) { name ->
|
||||||
supportActionBar?.title = name
|
supportActionBar?.title = name
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user