mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 04:08:44 +03:00
Simpler code
This commit is contained in:
parent
9c1475d2f1
commit
d2a1041a51
1 changed files with 6 additions and 12 deletions
|
@ -46,7 +46,7 @@ class ActiveConferenceView @JvmOverloads constructor(
|
|||
}
|
||||
|
||||
var callback: Callback? = null
|
||||
var jitsiWidget: Widget? = null
|
||||
private var jitsiWidget: Widget? = null
|
||||
|
||||
private lateinit var views: ViewActiveConferenceViewBinding
|
||||
|
||||
|
@ -95,18 +95,12 @@ class ActiveConferenceView @JvmOverloads constructor(
|
|||
val summary = state.asyncRoomSummary()
|
||||
if (summary?.membership == Membership.JOIN) {
|
||||
// We only display banner for 'live' widgets
|
||||
val activeConf =
|
||||
state.activeRoomWidgets()?.firstOrNull {
|
||||
// for now only jitsi?
|
||||
it.type == WidgetType.Jitsi
|
||||
}
|
||||
|
||||
if (activeConf == null) {
|
||||
isVisible = false
|
||||
} else {
|
||||
isVisible = true
|
||||
jitsiWidget = activeConf
|
||||
jitsiWidget = state.activeRoomWidgets()?.firstOrNull {
|
||||
// for now only jitsi?
|
||||
it.type == WidgetType.Jitsi
|
||||
}
|
||||
|
||||
isVisible = jitsiWidget != null
|
||||
// if sent by me or if i can moderate?
|
||||
views.deleteWidgetButton.isVisible = state.isAllowedToManageWidgets
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue