mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Jitsi conf: don't show ui in DM
This commit is contained in:
parent
6e55076f7c
commit
4821852430
2 changed files with 5 additions and 3 deletions
|
@ -44,7 +44,6 @@ import org.matrix.android.sdk.api.session.room.model.Membership
|
|||
object Progress : State()
|
||||
}
|
||||
|
||||
private val dimensionConverter = DimensionConverter(context.resources)
|
||||
private val views: ViewRemoveJitsiWidgetBinding
|
||||
private var state: State = State.Unmount
|
||||
var onCompleteSliding: (() -> Unit)? = null
|
||||
|
@ -89,7 +88,10 @@ import org.matrix.android.sdk.api.session.room.model.Membership
|
|||
|
||||
fun render(roomDetailViewState: RoomDetailViewState) {
|
||||
val summary = roomDetailViewState.asyncRoomSummary()
|
||||
val newState = if (summary?.membership != Membership.JOIN || !roomDetailViewState.isAllowedToManageWidgets || roomDetailViewState.jitsiState.widgetId == null) {
|
||||
val newState = if (summary?.membership != Membership.JOIN ||
|
||||
roomDetailViewState.isWebRTCCallOptionAvailable() ||
|
||||
!roomDetailViewState.isAllowedToManageWidgets ||
|
||||
roomDetailViewState.jitsiState.widgetId == null) {
|
||||
State.Unmount
|
||||
} else if (roomDetailViewState.jitsiState.deleteWidgetInProgress) {
|
||||
State.Progress
|
||||
|
|
|
@ -745,7 +745,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
R.id.voice_call -> state.isWebRTCCallOptionAvailable()
|
||||
R.id.video_call -> state.isWebRTCCallOptionAvailable() || state.jitsiState.confId == null || state.jitsiState.hasJoined
|
||||
// Show Join conference button only if there is an active conf id not joined. Otherwise fallback to default video disabled. ^
|
||||
R.id.join_conference -> state.jitsiState.confId != null && !state.jitsiState.hasJoined
|
||||
R.id.join_conference -> !state.isWebRTCCallOptionAvailable() && state.jitsiState.confId != null && !state.jitsiState.hasJoined
|
||||
R.id.search -> true
|
||||
R.id.dev_tools -> vectorPreferences.developerMode()
|
||||
else -> false
|
||||
|
|
Loading…
Reference in a new issue