diff --git a/Linphone/UI/Call/CallView.swift b/Linphone/UI/Call/CallView.swift index e8d1d2112..46dfd2378 100644 --- a/Linphone/UI/Call/CallView.swift +++ b/Linphone/UI/Call/CallView.swift @@ -2031,21 +2031,17 @@ struct CallView: View { if callViewModel.isOneOneCall { VStack { Button { - if callViewModel.callsCounter < 2 { - withAnimation { - callViewModel.isTransferInsteadCall = true - MagicSearchSingleton.shared.searchForSuggestions() - isShowStartCallFragment.toggle() + withAnimation { + callViewModel.isTransferInsteadCall = true + MagicSearchSingleton.shared.searchForSuggestions() + isShowStartCallFragment.toggle() + } + + DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { + telecomManager.callStarted = false + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + telecomManager.callStarted = true } - - DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { - telecomManager.callStarted = false - DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { - telecomManager.callStarted = true - } - } - } else { - callViewModel.transferClicked() } } label: { HStack { @@ -2061,7 +2057,7 @@ struct CallView: View { .background(Color.gray500) .cornerRadius(40) - Text(callViewModel.callsCounter < 2 ? "call_action_blind_transfer" : "call_action_attended_transfer") + Text("call_action_blind_transfer") .foregroundStyle(.white) .default_text_style(styleSize: 15) } @@ -2402,21 +2398,17 @@ struct CallView: View { if callViewModel.isOneOneCall { VStack { Button { - if callViewModel.callsCounter < 2 { - withAnimation { - callViewModel.isTransferInsteadCall = true - MagicSearchSingleton.shared.searchForSuggestions() - isShowStartCallFragment.toggle() + withAnimation { + callViewModel.isTransferInsteadCall = true + MagicSearchSingleton.shared.searchForSuggestions() + isShowStartCallFragment.toggle() + } + + DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { + telecomManager.callStarted = false + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + telecomManager.callStarted = true } - - DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { - telecomManager.callStarted = false - DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { - telecomManager.callStarted = true - } - } - } else { - callViewModel.transferClicked() } } label: { HStack { @@ -2432,7 +2424,7 @@ struct CallView: View { .background(Color.gray500) .cornerRadius(40) - Text(callViewModel.callsCounter < 2 ? "call_action_blind_transfer" : "call_action_attended_transfer") + Text("call_action_blind_transfer") .foregroundStyle(.white) .default_text_style(styleSize: 15) } diff --git a/Linphone/UI/Call/Fragments/CallsListFragment.swift b/Linphone/UI/Call/Fragments/CallsListFragment.swift index 0cceeb5e1..b501b413f 100644 --- a/Linphone/UI/Call/Fragments/CallsListFragment.swift +++ b/Linphone/UI/Call/Fragments/CallsListFragment.swift @@ -165,20 +165,20 @@ struct CallsListFragment: View { DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { callViewModel.resetCallView() } - } - }, label: { - HStack { - HStack { - Image((callViewModel.selectedCall!.state == .PausedByRemote - || callViewModel.selectedCall!.state == .Pausing + } + }, label: { + HStack { + HStack { + Image((callViewModel.selectedCall!.state == .PausedByRemote + || callViewModel.selectedCall!.state == .Pausing || callViewModel.selectedCall!.state == .Paused) ? String(localized: "call_action_resume_call") : String(localized: "call_action_pause_call")) - .resizable() - .frame(width: 30, height: 30) - - } - .frame(width: 35, height: 30) - .background(.clear) - .cornerRadius(40) + .resizable() + .frame(width: 30, height: 30) + + } + .frame(width: 35, height: 30) + .background(.clear) + .cornerRadius(40) Text((callViewModel.selectedCall!.state == .PausedByRemote || callViewModel.selectedCall!.state == .Pausing diff --git a/Linphone/UI/Main/History/Fragments/StartCallFragment.swift b/Linphone/UI/Main/History/Fragments/StartCallFragment.swift index 17be40a7c..69912cb66 100644 --- a/Linphone/UI/Main/History/Fragments/StartCallFragment.swift +++ b/Linphone/UI/Main/History/Fragments/StartCallFragment.swift @@ -96,6 +96,98 @@ struct StartCallFragment: View { .background(.white) VStack(spacing: 0) { + if callViewModel.isTransferInsteadCall { + VStack { + HStack(alignment: .center) { + Text("contacts_list_all_contacts_title") + .default_text_style_800(styleSize: 16) + + Spacer() + } + .padding(.vertical, 10) + .padding(.horizontal, 16) + + if callViewModel.calls.count > 1 { + ForEach(0..