mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Update encryption when call state changes
This commit is contained in:
parent
7237a5f4a7
commit
9413f6f5dc
1 changed files with 5 additions and 1 deletions
|
|
@ -292,6 +292,10 @@ class CallViewModel: ObservableObject {
|
||||||
self.zrtpPopupDisplayed = true
|
self.zrtpPopupDisplayed = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, onStateChanged: { (_: Call, state: Call.State, message: String) in
|
||||||
|
if let currentParamsTmp = self.currentCall?.currentParams, state == .StreamsRunning, currentParamsTmp.mediaEncryption == .None || currentParamsTmp.mediaEncryption == .SRTP {
|
||||||
|
self.updateEncryption(withToast: false)
|
||||||
|
}
|
||||||
}, onStatsUpdated: { (_: Call, stats: CallStats) in
|
}, onStatsUpdated: { (_: Call, stats: CallStats) in
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
if self.currentCall != nil {
|
if self.currentCall != nil {
|
||||||
|
|
@ -986,7 +990,7 @@ class CallViewModel: ObservableObject {
|
||||||
self.isNotEncrypted = false
|
self.isNotEncrypted = false
|
||||||
}
|
}
|
||||||
case MediaEncryption.None:
|
case MediaEncryption.None:
|
||||||
let isNotEncryptedTmp = self.currentCall?.state == .StreamsRunning
|
let isNotEncryptedTmp = self.currentCall?.state == .StreamsRunning && !self.telecomManager.outgoingCallStarted
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.isMediaEncrypted = false
|
self.isMediaEncrypted = false
|
||||||
self.isZrtp = false
|
self.isZrtp = false
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue