Add extra logs the 'send call notification' flow (#4819)

This commit is contained in:
Jorge Martin Espinosa 2025-06-05 13:34:45 +02:00 committed by GitHub
parent 800a3318e6
commit 3ba11db282
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 76 additions and 19 deletions

View file

@ -46,14 +46,18 @@ class RoomCallStatePresenter @Inject constructor(
(currentCall as? CurrentCall.RoomCall)?.roomId == room.roomId
}
}
val callState = when {
isAvailable.not() -> RoomCallState.Unavailable
roomInfo.hasRoomCall -> RoomCallState.OnGoing(
canJoinCall = canJoinCall,
isUserInTheCall = isUserInTheCall,
isUserLocallyInTheCall = isUserLocallyInTheCall,
)
else -> RoomCallState.StandBy(canStartCall = canJoinCall)
val callState by remember {
derivedStateOf {
when {
isAvailable.not() -> RoomCallState.Unavailable
roomInfo.hasRoomCall -> RoomCallState.OnGoing(
canJoinCall = canJoinCall,
isUserInTheCall = isUserInTheCall,
isUserLocallyInTheCall = isUserLocallyInTheCall,
)
else -> RoomCallState.StandBy(canStartCall = canJoinCall)
}
}
}
return callState
}