Graceful calling lobby handling
This commit is contained in:
parent
4b1d7729d3
commit
1dc1a4d41b
2 changed files with 15 additions and 8 deletions
|
@ -1783,8 +1783,6 @@ export class CallingClass {
|
|||
await processGroupCallRingCancellation(ringId);
|
||||
}
|
||||
|
||||
this.stopCallingLobby();
|
||||
|
||||
if (shouldRing) {
|
||||
log.info('handleGroupCallRingUpdate: ringing');
|
||||
this.reduxInterface?.receiveIncomingGroupCall({
|
||||
|
@ -1888,8 +1886,6 @@ export class CallingClass {
|
|||
|
||||
this.attachToCall(conversation, call);
|
||||
|
||||
this.stopCallingLobby();
|
||||
|
||||
this.reduxInterface.receiveIncomingDirectCall({
|
||||
conversationId: conversation.id,
|
||||
isVideoCall: call.isVideoCall,
|
||||
|
|
|
@ -1025,10 +1025,21 @@ function keyChangeOk(
|
|||
|
||||
function receiveIncomingDirectCall(
|
||||
payload: IncomingDirectCallType
|
||||
): IncomingDirectCallActionType {
|
||||
return {
|
||||
type: INCOMING_DIRECT_CALL,
|
||||
payload,
|
||||
): ThunkAction<void, RootStateType, unknown, IncomingDirectCallActionType> {
|
||||
return (dispatch, getState) => {
|
||||
const callState = getState().calling;
|
||||
|
||||
if (
|
||||
callState.activeCallState &&
|
||||
callState.activeCallState.conversationId === payload.conversationId
|
||||
) {
|
||||
calling.stopCallingLobby();
|
||||
}
|
||||
|
||||
dispatch({
|
||||
type: INCOMING_DIRECT_CALL,
|
||||
payload,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue