Calling: Clear activeCall only for incoming prering/ringing calls

This commit is contained in:
Scott Nonnenberg 2021-08-10 16:16:18 -07:00 committed by GitHub
parent 1d91f59368
commit f431f15a5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,7 @@ import { getIncomingCall } from '../selectors/calling';
import { import {
ActiveCallType, ActiveCallType,
CallMode, CallMode,
CallState,
GroupCallRemoteParticipantType, GroupCallRemoteParticipantType,
} from '../../types/Calling'; } from '../../types/Calling';
import { StateType } from '../reducer'; import { StateType } from '../reducer';
@ -89,8 +90,11 @@ const mapStateToActiveCallProp = (
switch (call.callMode) { switch (call.callMode) {
case CallMode.Direct: case CallMode.Direct:
// If the call is incoming, it's not an 'active' call and we shouldn't show a lobby. if (
if (call.isIncoming) { call.isIncoming &&
(call.callState === CallState.Prering ||
call.callState === CallState.Ringing)
) {
return; return;
} }