fix: Fix currentCID is null when handleNewCall is triggered, which will cause family-app.

This commit is contained in:
duanweiwei1982@gmail.com 2022-07-15 22:34:19 +08:00
parent 50ef19b8a8
commit e789ab904f
1 changed files with 10 additions and 10 deletions

View File

@ -197,17 +197,17 @@ class VoIP {
content['offer']['sdp'], content['offer']['sdp'],
content['offer']['type'], content['offer']['type'],
); );
await newCall await newCall.initWithInvite(
.initWithInvite( callType, offer, sdpStreamMetadata, lifetime, confId != null);
callType, offer, sdpStreamMetadata, lifetime, confId != null)
.then((_) { currentCID = callId;
// Popup CallingPage for incoming call. // Popup CallingPage for incoming call.
if (!delegate.isBackgroud && confId == null) { if (!delegate.isBackgroud && confId == null) {
delegate.handleNewCall(newCall); delegate.handleNewCall(newCall);
} }
onIncomingCall.add(newCall); onIncomingCall.add(newCall);
});
currentCID = callId;
if (delegate.isBackgroud) { if (delegate.isBackgroud) {
/// Forced to enable signaling synchronization until the end of the call. /// Forced to enable signaling synchronization until the end of the call.