on show voice call only option in DMs
This commit is contained in:
parent
22a9e541fe
commit
fdd39fa17b
8 changed files with 32 additions and 15 deletions
|
|
@ -18,6 +18,7 @@ sealed interface RoomCallState {
|
|||
|
||||
data class StandBy(
|
||||
val canStartCall: Boolean,
|
||||
val isDM: Boolean,
|
||||
// TODO: add is DM to know if should show the voice call option?
|
||||
) : RoomCallState
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ open class RoomCallStateProvider : PreviewParameterProvider<RoomCallState> {
|
|||
override val values: Sequence<RoomCallState> = sequenceOf(
|
||||
aStandByCallState(),
|
||||
aStandByCallState(canStartCall = false),
|
||||
aStandByCallState(canStartCall = false, isDM = true),
|
||||
anOngoingCallState(),
|
||||
anOngoingCallState(canJoinCall = false),
|
||||
anOngoingCallState(canJoinCall = true, isUserInTheCall = true),
|
||||
|
|
@ -36,6 +37,8 @@ fun anOngoingCallState(
|
|||
|
||||
fun aStandByCallState(
|
||||
canStartCall: Boolean = true,
|
||||
isDM: Boolean = false,
|
||||
) = RoomCallState.StandBy(
|
||||
canStartCall = canStartCall,
|
||||
isDM
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue