fix: Fix can't correctly remove/cleanup call in group call.

This commit is contained in:
Duan Weiwei 2023-01-27 12:23:18 +00:00 committed by td
parent da0b3c4c46
commit 8ed9913eb6
1 changed files with 6 additions and 2 deletions

View File

@ -1071,8 +1071,12 @@ class CallSession {
if (shouldEmit) { if (shouldEmit) {
setCallState(CallState.kEnded); setCallState(CallState.kEnded);
} }
if (callId != voip.currentCID) return;
voip.currentCID = null; if (!isGroupCall) {
if (callId != voip.currentCID) return;
voip.currentCID = null;
}
voip.calls.remove(callId); voip.calls.remove(callId);
voip.incomingCallRoomId.removeWhere((key, value) => value == callId); voip.incomingCallRoomId.removeWhere((key, value) => value == callId);
await cleanUp(); await cleanUp();