From f431f15a5efbe0293ddabc5c3e98dc0d53d06450 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 10 Aug 2021 16:16:18 -0700 Subject: [PATCH] Calling: Clear activeCall only for incoming prering/ringing calls --- ts/state/smart/CallManager.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ts/state/smart/CallManager.tsx b/ts/state/smart/CallManager.tsx index c967b52608..b16fa7d644 100644 --- a/ts/state/smart/CallManager.tsx +++ b/ts/state/smart/CallManager.tsx @@ -15,6 +15,7 @@ import { getIncomingCall } from '../selectors/calling'; import { ActiveCallType, CallMode, + CallState, GroupCallRemoteParticipantType, } from '../../types/Calling'; import { StateType } from '../reducer'; @@ -89,8 +90,11 @@ const mapStateToActiveCallProp = ( switch (call.callMode) { case CallMode.Direct: - // If the call is incoming, it's not an 'active' call and we shouldn't show a lobby. - if (call.isIncoming) { + if ( + call.isIncoming && + (call.callState === CallState.Prering || + call.callState === CallState.Ringing) + ) { return; }