mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
on show voice call only option in DMs
This commit is contained in:
+1
@@ -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
|
||||
|
||||
|
||||
+3
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user