Add a RoomScreenHook.

This commit is contained in:
Doug
2025-06-06 14:53:29 +01:00
committed by Stefan Ceriu
parent 3f61eb8c5e
commit e3884f903c
13 changed files with 86 additions and 10 deletions
@@ -43,9 +43,18 @@ struct RoomScreenViewState: BindableState {
}
var canSendMessage = true
/// Whether or not starting a call is supported.
var isCallingEnabled = true
/// Whether or not the user is allowed to join calls in this room.
var canJoinCall = false
/// Whether or not this room currently has a call in progress.
var hasOngoingCall: Bool
var shouldShowCallButton = true
/// Whether or not the user is already part of a call in another room.
var isParticipatingInOngoingCall = false
var shouldShowCallButton: Bool {
isCallingEnabled && !isParticipatingInOngoingCall // Hide the join call button when already in the call
}
var isKnockingEnabled = false
var isKnockableRoom = false
@@ -70,7 +79,7 @@ struct RoomScreenViewState: BindableState {
var footerDetails: RoomScreenFooterViewDetails?
var bindings: RoomScreenViewStateBindings
var bindings = RoomScreenViewStateBindings()
}
struct RoomScreenViewStateBindings {