Fix Dialer in transfer call

This commit is contained in:
Benoit Martins 2026-03-27 16:36:48 +01:00
parent eaa19e60ae
commit 916dff04ef
4 changed files with 23 additions and 27 deletions

View file

@ -2,6 +2,6 @@ import Foundation
public enum AppGitInfo {
public static let branch = "release/6.2"
public static let commit = "b764c068e"
public static let commit = "eaa19e60a"
public static let tag = "6.2.0-beta"
}

View file

@ -110,6 +110,8 @@ struct CallView: View {
callViewModel: callViewModel,
isShowStartCallFragment: $isShowStartCallFragment,
showingDialer: $showingDialer,
transferAddress: .constant(nil),
isShowTransferPopup: .constant(false),
currentCall: callViewModel.currentCall
)
.presentationDetents([.medium])
@ -147,6 +149,8 @@ struct CallView: View {
callViewModel: callViewModel,
isShowStartCallFragment: $isShowStartCallFragment,
showingDialer: $showingDialer,
transferAddress: .constant(nil),
isShowTransferPopup: .constant(false),
currentCall: callViewModel.currentCall
)
.presentationDetents([.medium])
@ -179,6 +183,8 @@ struct CallView: View {
callViewModel: callViewModel,
isShowStartCallFragment: $isShowStartCallFragment,
showingDialer: $showingDialer,
transferAddress: .constant(nil),
isShowTransferPopup: .constant(false),
currentCall: callViewModel.currentCall
)
} onDismiss: {}

View file

@ -42,6 +42,9 @@ struct DialerBottomSheet: View {
@Binding var isShowStartCallFragment: Bool
@Binding var showingDialer: Bool
@Binding var transferAddress: Address?
@Binding var isShowTransferPopup: Bool
let currentCall: Call?
var body: some View {
@ -405,24 +408,15 @@ struct DialerBottomSheet: View {
Button {
if !startCallViewModel.searchField.isEmpty {
if callViewModel.isTransferInsteadCall {
showingDialer = false
magicSearch.currentFilter = ""
magicSearch.searchForContacts()
if callViewModel.isTransferInsteadCall == true {
callViewModel.isTransferInsteadCall = false
CoreContext.shared.doOnCoreQueue { core in
if let transferAddressTmp = core.interpretUrl(url: startCallViewModel.searchField, applyInternationalPrefix: LinphoneUtils.applyInternationalPrefix(core: core)) {
DispatchQueue.main.async {
showingDialer = false
self.transferAddress = transferAddressTmp
self.isShowTransferPopup = true
}
}
}
callViewModel.resetCallView()
withAnimation {
isShowStartCallFragment.toggle()
startCallViewModel.interpretAndStartCall()
}
startCallViewModel.searchField = ""
} else {
showingDialer = false
@ -504,13 +498,4 @@ struct DialerBottomSheet: View {
}
}
#Preview {
DialerBottomSheet(
startCallViewModel: StartCallViewModel()
, callViewModel: CallViewModel()
, isShowStartCallFragment: .constant(false)
, showingDialer: .constant(false)
, currentCall: nil)
}
// swiftlint:enable type_body_length

View file

@ -42,6 +42,7 @@ struct StartCallFragment: View {
@Binding var showingDialer: Bool
@Binding var isShowStartCallFragment: Bool
@FocusState var isSearchFieldFocused: Bool
@State private var delayedColor = Color.white
@ -57,6 +58,8 @@ struct StartCallFragment: View {
callViewModel: callViewModel,
isShowStartCallFragment: $isShowStartCallFragment,
showingDialer: $showingDialer,
transferAddress: $transferAddress,
isShowTransferPopup: $isShowTransferPopup,
currentCall: nil
)
.presentationDetents([.medium])
@ -70,6 +73,8 @@ struct StartCallFragment: View {
callViewModel: callViewModel,
isShowStartCallFragment: $isShowStartCallFragment,
showingDialer: $showingDialer,
transferAddress: $transferAddress,
isShowTransferPopup: $isShowTransferPopup,
currentCall: nil
)
} onDismiss: {}