WIP: Support using Element Call for voice calls in DMs
This commit is contained in:
parent
66c3bf267a
commit
ec420332c3
26 changed files with 122 additions and 42 deletions
|
|
@ -18,10 +18,12 @@ sealed interface RoomCallState {
|
|||
|
||||
data class StandBy(
|
||||
val canStartCall: Boolean,
|
||||
// TODO: add is DM to know if should show the voice call option?
|
||||
) : RoomCallState
|
||||
|
||||
data class OnGoing(
|
||||
val canJoinCall: Boolean,
|
||||
val isVoiceIntent: Boolean,
|
||||
val isUserInTheCall: Boolean,
|
||||
val isUserLocallyInTheCall: Boolean,
|
||||
) : RoomCallState
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ open class RoomCallStateProvider : PreviewParameterProvider<RoomCallState> {
|
|||
anOngoingCallState(),
|
||||
anOngoingCallState(canJoinCall = false),
|
||||
anOngoingCallState(canJoinCall = true, isUserInTheCall = true),
|
||||
anOngoingCallState(canJoinCall = true, isVoiceIntent = true),
|
||||
RoomCallState.Unavailable,
|
||||
)
|
||||
}
|
||||
|
|
@ -25,10 +26,12 @@ fun anOngoingCallState(
|
|||
canJoinCall: Boolean = true,
|
||||
isUserInTheCall: Boolean = false,
|
||||
isUserLocallyInTheCall: Boolean = isUserInTheCall,
|
||||
isVoiceIntent: Boolean = false,
|
||||
) = RoomCallState.OnGoing(
|
||||
canJoinCall = canJoinCall,
|
||||
isUserInTheCall = isUserInTheCall,
|
||||
isUserLocallyInTheCall = isUserLocallyInTheCall,
|
||||
isVoiceIntent = isVoiceIntent
|
||||
)
|
||||
|
||||
fun aStandByCallState(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue