mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Handle 1:1 call reconnecting events.
This commit is contained in:
committed by
Greyson Parrelli
parent
3af53f2089
commit
403958fed3
@@ -278,7 +278,7 @@ data class CallParticipantsState(
|
||||
if (isExpanded && (localParticipant.isVideoEnabled || isNonIdleGroupCall)) {
|
||||
return WebRtcLocalRenderState.EXPANDED
|
||||
} else if (displayLocal || showVideoForOutgoing) {
|
||||
if (callState == WebRtcViewModel.State.CALL_CONNECTED) {
|
||||
if (callState == WebRtcViewModel.State.CALL_CONNECTED || callState == WebRtcViewModel.State.CALL_RECONNECTING) {
|
||||
localRenderState = if (isViewingFocusedParticipant || numberOfRemoteParticipants > 1) {
|
||||
WebRtcLocalRenderState.SMALLER_RECTANGLE
|
||||
} else if (numberOfRemoteParticipants == 1) {
|
||||
|
||||
@@ -349,6 +349,9 @@ public class WebRtcCallViewModel extends ViewModel {
|
||||
case NETWORK_FAILURE:
|
||||
callState = WebRtcControls.CallState.ERROR;
|
||||
break;
|
||||
case CALL_RECONNECTING:
|
||||
callState = WebRtcControls.CallState.RECONNECTING;
|
||||
break;
|
||||
default:
|
||||
callState = WebRtcControls.CallState.ONGOING;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public final class WebRtcControls {
|
||||
}
|
||||
|
||||
boolean displayEndCall() {
|
||||
return isAtLeastOutgoing();
|
||||
return isAtLeastOutgoing() || callState == CallState.RECONNECTING;
|
||||
}
|
||||
|
||||
boolean displayMuteAudio() {
|
||||
@@ -182,7 +182,7 @@ public final class WebRtcControls {
|
||||
}
|
||||
|
||||
boolean isFadeOutEnabled() {
|
||||
return isAtLeastOutgoing() && isRemoteVideoEnabled;
|
||||
return isAtLeastOutgoing() && isRemoteVideoEnabled && callState != CallState.RECONNECTING;
|
||||
}
|
||||
|
||||
boolean displaySmallOngoingCallButtons() {
|
||||
@@ -248,6 +248,7 @@ public final class WebRtcControls {
|
||||
NONE,
|
||||
ERROR,
|
||||
PRE_JOIN,
|
||||
RECONNECTING,
|
||||
INCOMING,
|
||||
OUTGOING,
|
||||
ONGOING,
|
||||
|
||||
Reference in New Issue
Block a user