From 8ed9913eb6524ae6370b2b6ce4183fffb8b3fe54 Mon Sep 17 00:00:00 2001 From: Duan Weiwei Date: Fri, 27 Jan 2023 12:23:18 +0000 Subject: [PATCH] fix: Fix can't correctly remove/cleanup call in group call. --- lib/src/voip/call.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/src/voip/call.dart b/lib/src/voip/call.dart index 23e0d99e..2155dee7 100644 --- a/lib/src/voip/call.dart +++ b/lib/src/voip/call.dart @@ -1071,8 +1071,12 @@ class CallSession { if (shouldEmit) { 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.incomingCallRoomId.removeWhere((key, value) => value == callId); await cleanUp();