Merge pull request #4567 from vector-im/feature/adm/stuck-voip

Always showing hang up button in VOIP calls
This commit is contained in:
Benoit Marty 2021-11-29 16:24:16 +01:00 committed by GitHub
commit df23cc4e09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

1
changelog.d/4144.bugfix Normal file
View File

@ -0,0 +1 @@
Allowing users to hang up VOIP calls during the initialisation phase (avoids getting stuck in the call screen if something goes wrong)

View File

@ -97,6 +97,8 @@ class CallControlsView @JvmOverloads constructor(
views.ringingControlDecline.isVisible = true
views.connectedControls.isVisible = false
}
CallState.CreateOffer,
CallState.Idle,
is CallState.Connected,
is CallState.Dialing,
is CallState.Answering -> {
@ -105,7 +107,7 @@ class CallControlsView @JvmOverloads constructor(
views.videoToggleIcon.isVisible = state.isVideoCall
views.moreIcon.isVisible = callState is CallState.Connected && callState.iceConnectionState == MxPeerConnectionState.CONNECTED
}
else -> {
is CallState.Ended -> {
views.ringingControls.isVisible = false
views.connectedControls.isVisible = false
}