Add green call banner

This commit is contained in:
Benoit Martins 2024-05-02 15:38:55 +02:00
parent 32dc6ea345
commit cfe3bef32d
4 changed files with 31 additions and 2 deletions

View file

@ -48,6 +48,9 @@
},
"#" : {
},
"%@" : {
},
"%lld" : {
@ -61,6 +64,9 @@
}
}
}
},
"%lld appels" : {
},
"%lld Book (Example)" : {
"extractionState" : "manual",

View file

@ -113,6 +113,9 @@ class TelecomManager: ObservableObject {
setHeldOtherCalls(core: core, exceptCallid: "")
requestTransaction(transaction, action: "startCall")
withAnimation {
self.callDisplayed = true
}
} else {
try doCall(core: core, addr: addr!, isSas: isSas, isVideo: isVideo, isConference: isConference)
}

View file

@ -61,7 +61,7 @@ class CallViewModel: ObservableObject {
private var mConferenceSuscriptions = Set<AnyCancellable?>()
var calls: [Call] = []
@Published var calls: [Call] = []
let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect()
@ -996,7 +996,6 @@ class CallViewModel: ObservableObject {
default: "cell-signal-none"
}
print("iconiconicon \(icon) \(self.currentCall!.currentQuality)")
DispatchQueue.main.async {
self.qualityValue = quality
self.qualityIcon = icon

View file

@ -73,7 +73,28 @@ struct ContentView: View {
VStack(spacing: 0) {
if telecomManager.callInProgress && !fullscreenVideo && ((!telecomManager.callDisplayed && callViewModel.calls.count == 1) || callViewModel.calls.count > 1) {
HStack {
Image("phone")
.renderingMode(.template)
.resizable()
.foregroundStyle(.white)
.frame(width: 26, height: 26)
.padding(.leading, 10)
if callViewModel.calls.count > 1 {
Text("\(callViewModel.calls.count) appels")
.default_text_style_white(styleSize: 16)
} else {
Text("\(callViewModel.displayName)")
.default_text_style_white(styleSize: 16)
}
Spacer()
if callViewModel.calls.count == 1 {
Text("\(callViewModel.isPaused || telecomManager.isPausedByRemote ? "En pause" : "Actif")")
.default_text_style_white(styleSize: 16)
.padding(.trailing, 10)
}
}
.frame(maxWidth: .infinity)
.frame(height: 30)