mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix fullscreen mode in CallView
This commit is contained in:
parent
3aba3bc975
commit
0335d4efaf
5 changed files with 967 additions and 1033 deletions
|
|
@ -45,7 +45,6 @@ class TelecomManager: ObservableObject {
|
|||
@Published var callInProgress: Bool = false
|
||||
@Published var callDisplayed: Bool = true
|
||||
@Published var callStarted: Bool = false
|
||||
@Published var isNotVerifiedCounter: Int = 0
|
||||
@Published var outgoingCallStarted: Bool = false
|
||||
@Published var remoteConfVideo: Bool = false
|
||||
@Published var isRecordingByRemote: Bool = false
|
||||
|
|
@ -276,7 +275,6 @@ class TelecomManager: ObservableObject {
|
|||
DispatchQueue.main.async {
|
||||
self.outgoingCallStarted = true
|
||||
self.callStarted = true
|
||||
self.isNotVerifiedCounter = 0
|
||||
if self.callInProgress == false {
|
||||
withAnimation {
|
||||
self.callInProgress = true
|
||||
|
|
@ -324,7 +322,6 @@ class TelecomManager: ObservableObject {
|
|||
|
||||
DispatchQueue.main.async {
|
||||
self.callStarted = true
|
||||
self.isNotVerifiedCounter = 0
|
||||
if self.callDisplayed {
|
||||
self.callDisplayed = core.calls.count <= 1
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -334,27 +334,6 @@ struct ZRTPPopup: View {
|
|||
}
|
||||
.padding(.bottom, 5)
|
||||
|
||||
if telecomManager.isNotVerifiedCounter <= 1 {
|
||||
Button(action: {
|
||||
callViewModel.isNotVerified = false
|
||||
}, label: {
|
||||
Text("call_dialog_zrtp_security_alert_try_again")
|
||||
.foregroundStyle(Color.redDanger500)
|
||||
.default_text_style_orange_600(styleSize: 20 / resizeView)
|
||||
.frame(height: 35 / resizeView)
|
||||
.frame(maxWidth: .infinity)
|
||||
})
|
||||
.padding(.horizontal, 20 / resizeView)
|
||||
.padding(.vertical, 10 / resizeView)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(Color.redDanger500, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
}
|
||||
|
||||
Button(action: {
|
||||
callViewModel.terminateCall()
|
||||
}, label: {
|
||||
|
|
|
|||
|
|
@ -254,31 +254,26 @@ class CallViewModel: ObservableObject {
|
|||
}
|
||||
|
||||
self.callDelegate = CallDelegateStub(onEncryptionChanged: { (_: Call, _: Bool, _: String)in
|
||||
self.updateEncryption(withToast: false)
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||
self.updateEncryption(withToast: false)
|
||||
}
|
||||
if self.currentCall != nil {
|
||||
self.callMediaEncryptionModel.update(call: self.currentCall!)
|
||||
}
|
||||
}, onAuthenticationTokenVerified: { (_, verified: Bool) in
|
||||
Log.warn("[CallViewModel][ZRTPPopup] Notified that authentication token is \(verified ? "verified" : "not verified!")")
|
||||
if verified {
|
||||
self.updateEncryption(withToast: true)
|
||||
if self.currentCall != nil {
|
||||
self.callMediaEncryptionModel.update(call: self.currentCall!)
|
||||
}
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||
self.updateEncryption(withToast: true)
|
||||
if self.currentCall != nil {
|
||||
self.callMediaEncryptionModel.update(call: self.currentCall!)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if self.telecomManager.isNotVerifiedCounter == 0 {
|
||||
DispatchQueue.main.async {
|
||||
self.isNotVerified = true
|
||||
self.telecomManager.isNotVerifiedCounter += 1
|
||||
}
|
||||
self.showZrtpSasDialogIfPossible()
|
||||
} else {
|
||||
DispatchQueue.main.async {
|
||||
self.isNotVerified = true
|
||||
self.telecomManager.isNotVerifiedCounter += 1
|
||||
self.zrtpPopupDisplayed = true
|
||||
}
|
||||
}
|
||||
DispatchQueue.main.async {
|
||||
self.isNotVerified = true
|
||||
self.zrtpPopupDisplayed = true
|
||||
}
|
||||
}
|
||||
}, onStatsUpdated: { (_: Call, stats: CallStats) in
|
||||
DispatchQueue.main.async {
|
||||
|
|
@ -666,7 +661,6 @@ class CallViewModel: ObservableObject {
|
|||
telecomManager.callInProgress = true
|
||||
telecomManager.callDisplayed = true
|
||||
telecomManager.callStarted = true
|
||||
telecomManager.isNotVerifiedCounter = 0
|
||||
}
|
||||
|
||||
coreContext.doOnCoreQueue { core in
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ struct ContentView: View {
|
|||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
VStack(spacing: 0) {
|
||||
if !sharedMainViewModel.fileUrlsToShare.isEmpty && !telecomManager.callInProgress || (telecomManager.callInProgress && !telecomManager.callDisplayed) {
|
||||
if !sharedMainViewModel.fileUrlsToShare.isEmpty && (!telecomManager.callInProgress || (telecomManager.callInProgress && !telecomManager.callDisplayed)) {
|
||||
HStack {
|
||||
Image("share-network")
|
||||
.renderingMode(.template)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue