From 2e5ba428a0b2c43c5f4bf8c66c459fe6ad3cf3a6 Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Mon, 15 Jan 2024 17:20:18 +0100 Subject: [PATCH] Fixes for first release --- Linphone/Core/CoreContext.swift | 4 +-- Linphone/TelecomManager/TelecomManager.swift | 9 +++++ .../Assistant/Fragments/LoginFragment.swift | 1 + .../Fragments/PermissionsFragment.swift | 4 ++- .../Fragments/ProfileModeFragment.swift | 4 +++ .../Fragments/QrCodeScannerFragment.swift | 2 ++ .../Fragments/RegisterFragment.swift | 4 ++- .../ThirdPartySipAccountLoginFragment.swift | 4 ++- .../ThirdPartySipAccountWarningFragment.swift | 4 ++- Linphone/UI/Call/CallView.swift | 34 +++++++++++-------- .../UI/Call/ViewModel/CallViewModel.swift | 4 +-- .../ContactInnerActionsFragment.swift | 9 +++++ .../Fragments/ContactInnerFragment.swift | 4 +++ .../Fragments/ContactListBottomSheet.swift | 3 ++ .../Fragments/ContactsInnerFragment.swift | 1 + .../Fragments/ContactsListBottomSheet.swift | 3 ++ .../Fragments/EditContactFragment.swift | 5 +++ Linphone/UI/Main/ContentView.swift | 12 +++++-- Linphone/UI/Main/Fragments/ToastView.swift | 1 + .../Fragments/HistoryContactFragment.swift | 6 ++++ .../Fragments/HistoryListBottomSheet.swift | 4 +++ .../Fragments/HistoryListFragment.swift | 1 + .../History/Fragments/StartCallFragment.swift | 3 ++ 23 files changed, 101 insertions(+), 25 deletions(-) diff --git a/Linphone/Core/CoreContext.swift b/Linphone/Core/CoreContext.swift index 3e579d97c..61ea05a5a 100644 --- a/Linphone/Core/CoreContext.swift +++ b/Linphone/Core/CoreContext.swift @@ -153,10 +153,10 @@ final class CoreContext: ObservableObject { } else if cbVal.state == .Progress { self.loggingInProgress = true } else { - ToastViewModel.shared.toastMessage = "Registration failed" - ToastViewModel.shared.displayToast = true self.loggingInProgress = false self.loggedIn = false + ToastViewModel.shared.toastMessage = "Registration failed" + ToastViewModel.shared.displayToast = true } }) diff --git a/Linphone/TelecomManager/TelecomManager.swift b/Linphone/TelecomManager/TelecomManager.swift index aa93fd28a..98a65005c 100644 --- a/Linphone/TelecomManager/TelecomManager.swift +++ b/Linphone/TelecomManager/TelecomManager.swift @@ -338,8 +338,17 @@ class TelecomManager: ObservableObject { } else { DispatchQueue.main.async { + let oldRemoteVideo = self.remoteVideo self.remoteVideo = (core.videoActivationPolicy?.automaticallyAccept ?? false) && (call.remoteParams?.videoEnabled ?? false) + if oldRemoteVideo != self.remoteVideo && self.remoteVideo { + do { + try AVAudioSession.sharedInstance().overrideOutputAudioPort(.speaker) + } catch _ { + + } + } + if self.remoteVideo { Log.info("[Call] Remote video is activated") } diff --git a/Linphone/UI/Assistant/Fragments/LoginFragment.swift b/Linphone/UI/Assistant/Fragments/LoginFragment.swift index 51fbd099c..c7e1da5e2 100644 --- a/Linphone/UI/Assistant/Fragments/LoginFragment.swift +++ b/Linphone/UI/Assistant/Fragments/LoginFragment.swift @@ -123,6 +123,7 @@ struct LoginFragment: View { Button(action: { sharedMainViewModel.changeDisplayProfileMode() self.accountLoginViewModel.login() + coreContext.loggingInProgress = true }, label: { Text(coreContext.loggedIn ? "Log out" : "assistant_account_login") .default_text_style_white_600(styleSize: 20) diff --git a/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift b/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift index fb7eed70a..e56089e6b 100644 --- a/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift +++ b/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift @@ -45,7 +45,9 @@ struct PermissionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) - .padding(.top, -65) + .padding(.all, 10) + .padding(.top, -75) + .padding(.leading, -10) .onTapGesture { withAnimation { dismiss() diff --git a/Linphone/UI/Assistant/Fragments/ProfileModeFragment.swift b/Linphone/UI/Assistant/Fragments/ProfileModeFragment.swift index fbe34e463..9c11671f5 100644 --- a/Linphone/UI/Assistant/Fragments/ProfileModeFragment.swift +++ b/Linphone/UI/Assistant/Fragments/ProfileModeFragment.swift @@ -58,6 +58,7 @@ struct ProfileModeFragment: View { Image("info") .resizable() .frame(width: 25, height: 25) + .padding(.all, 10) .onTapGesture { withAnimation { self.isShowPopupForDefault = true @@ -94,6 +95,7 @@ struct ProfileModeFragment: View { Image("info") .resizable() .frame(width: 25, height: 25) + .padding(.all, 10) .onTapGesture { withAnimation { self.isShowPopupForDefault = false @@ -139,6 +141,8 @@ struct ProfileModeFragment: View { } .onAppear { UserDefaults.standard.set(false, forKey: "display_profile_mode") + //Skip this view + sharedMainViewModel.changeHideProfileMode() } if self.isShowPopup { diff --git a/Linphone/UI/Assistant/Fragments/QrCodeScannerFragment.swift b/Linphone/UI/Assistant/Fragments/QrCodeScannerFragment.swift index a12a98419..a3a739dfc 100644 --- a/Linphone/UI/Assistant/Fragments/QrCodeScannerFragment.swift +++ b/Linphone/UI/Assistant/Fragments/QrCodeScannerFragment.swift @@ -45,6 +45,8 @@ struct QrCodeScannerFragment: View { .resizable() .foregroundStyle(Color.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) + .padding(.leading, -10) } .padding() .padding(.top, 50) diff --git a/Linphone/UI/Assistant/Fragments/RegisterFragment.swift b/Linphone/UI/Assistant/Fragments/RegisterFragment.swift index dbc339513..5b8178f30 100644 --- a/Linphone/UI/Assistant/Fragments/RegisterFragment.swift +++ b/Linphone/UI/Assistant/Fragments/RegisterFragment.swift @@ -42,7 +42,9 @@ struct RegisterFragment: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) - .padding(.top, -65) + .padding(.all, 10) + .padding(.top, -75) + .padding(.leading, -10) .onTapGesture { withAnimation { dismiss() diff --git a/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountLoginFragment.swift b/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountLoginFragment.swift index 8a8d5aa0b..9069efd75 100644 --- a/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountLoginFragment.swift +++ b/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountLoginFragment.swift @@ -52,7 +52,9 @@ struct ThirdPartySipAccountLoginFragment: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) - .padding(.top, -65) + .padding(.all, 10) + .padding(.top, -75) + .padding(.leading, -10) .onTapGesture { withAnimation { accountLoginViewModel.domain = "sip.linphone.org" diff --git a/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountWarningFragment.swift b/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountWarningFragment.swift index f9f9fb1f8..b63164bd5 100644 --- a/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountWarningFragment.swift +++ b/Linphone/UI/Assistant/Fragments/ThirdPartySipAccountWarningFragment.swift @@ -46,7 +46,9 @@ struct ThirdPartySipAccountWarningFragment: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) - .padding(.top, -65) + .padding(.all, 10) + .padding(.top, -75) + .padding(.leading, -10) .onTapGesture { withAnimation { dismiss() diff --git a/Linphone/UI/Call/CallView.swift b/Linphone/UI/Call/CallView.swift index a70340599..58f8fe232 100644 --- a/Linphone/UI/Call/CallView.swift +++ b/Linphone/UI/Call/CallView.swift @@ -93,6 +93,7 @@ struct CallView: View { .resizable() .foregroundStyle(.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text(!callViewModel.isHeadPhoneAvailable() ? "Earpiece" : "Headphones") .default_text_style_white(styleSize: 15) @@ -104,6 +105,7 @@ struct CallView: View { .resizable() .foregroundStyle(.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } }) .frame(maxHeight: .infinity) @@ -123,6 +125,7 @@ struct CallView: View { .resizable() .foregroundStyle(.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text("Speaker") .default_text_style_white(styleSize: 15) @@ -134,6 +137,7 @@ struct CallView: View { .resizable() .foregroundStyle(.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } }) .frame(maxHeight: .infinity) @@ -154,6 +158,7 @@ struct CallView: View { .resizable() .foregroundStyle(.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text("Bluetooth") .default_text_style_white(styleSize: 15) @@ -165,6 +170,7 @@ struct CallView: View { .resizable() .foregroundStyle(.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } }) .frame(maxHeight: .infinity) @@ -178,7 +184,7 @@ struct CallView: View { // swiftlint:disable:next cyclomatic_complexity func innerView(geometry: GeometryProxy) -> some View { VStack { - if !fullscreenVideo { + if !fullscreenVideo || (fullscreenVideo && telecomManager.isPausedByRemote) { if #available(iOS 16.0, *) { Rectangle() .foregroundColor(Color.orangeMain500) @@ -353,8 +359,8 @@ struct CallView: View { } } .frame( - maxWidth: fullscreenVideo ? geometry.size.width : geometry.size.width - 8, - maxHeight: fullscreenVideo ? geometry.size.height + geometry.safeAreaInsets.top + geometry.safeAreaInsets.bottom : geometry.size.height - 140 + maxWidth: fullscreenVideo && !telecomManager.isPausedByRemote ? geometry.size.width : geometry.size.width - 8, + maxHeight: fullscreenVideo && !telecomManager.isPausedByRemote ? geometry.size.height + geometry.safeAreaInsets.top + geometry.safeAreaInsets.bottom : geometry.size.height - 140 ) } @@ -367,7 +373,7 @@ struct CallView: View { .foregroundStyle(Color.redDanger500) .frame(width: 32, height: 32) .padding(10) - .if(fullscreenVideo) { view in + .if(fullscreenVideo && !telecomManager.isPausedByRemote) { view in view.padding(.top, 30) } Spacer() @@ -375,8 +381,8 @@ struct CallView: View { Spacer() } .frame( - maxWidth: fullscreenVideo ? geometry.size.width : geometry.size.width - 8, - maxHeight: fullscreenVideo ? geometry.size.height + geometry.safeAreaInsets.top + geometry.safeAreaInsets.bottom : geometry.size.height - 140 + maxWidth: fullscreenVideo && !telecomManager.isPausedByRemote ? geometry.size.width : geometry.size.width - 8, + maxHeight: fullscreenVideo && !telecomManager.isPausedByRemote ? geometry.size.height + geometry.safeAreaInsets.top + geometry.safeAreaInsets.bottom : geometry.size.height - 140 ) } @@ -405,19 +411,19 @@ struct CallView: View { Spacer() } .frame( - maxWidth: fullscreenVideo ? geometry.size.width : geometry.size.width - 8, - maxHeight: fullscreenVideo ? geometry.size.height + geometry.safeAreaInsets.top + geometry.safeAreaInsets.bottom : geometry.size.height - (0.1 * geometry.size.height) - 60 + maxWidth: fullscreenVideo && !telecomManager.isPausedByRemote ? geometry.size.width : geometry.size.width - 8, + maxHeight: fullscreenVideo && !telecomManager.isPausedByRemote ? geometry.size.height + geometry.safeAreaInsets.top + geometry.safeAreaInsets.bottom : geometry.size.height - (0.1 * geometry.size.height) - 60 ) .background(.clear) } } .frame( - maxWidth: fullscreenVideo ? geometry.size.width : geometry.size.width - 8, - maxHeight: fullscreenVideo ? geometry.size.height + geometry.safeAreaInsets.top + geometry.safeAreaInsets.bottom : geometry.size.height - (0.1 * geometry.size.height) - 60 + maxWidth: fullscreenVideo && !telecomManager.isPausedByRemote ? geometry.size.width : geometry.size.width - 8, + maxHeight: fullscreenVideo && !telecomManager.isPausedByRemote ? geometry.size.height + geometry.safeAreaInsets.top + geometry.safeAreaInsets.bottom : geometry.size.height - (0.1 * geometry.size.height) - 60 ) .background(Color.gray600) .cornerRadius(20) - .padding(.horizontal, fullscreenVideo ? 0 : 4) + .padding(.horizontal, fullscreenVideo && !telecomManager.isPausedByRemote ? 0 : 4) .onRotate { newOrientation in let oldOrientation = orientation orientation = newOrientation @@ -461,7 +467,7 @@ struct CallView: View { callViewModel.orientationUpdate(orientation: orientation) } - if !fullscreenVideo { + if !fullscreenVideo || (fullscreenVideo && telecomManager.isPausedByRemote) { if telecomManager.callStarted { let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene let bottomInset = scene?.windows.first?.safeAreaInsets @@ -526,7 +532,7 @@ struct CallView: View { } .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Color.gray900) - .if(fullscreenVideo) { view in + .if(fullscreenVideo && !telecomManager.isPausedByRemote) { view in view.ignoresSafeArea(.all) } } @@ -559,7 +565,7 @@ struct CallView: View { Button { callViewModel.toggleVideo() } label: { - Image(callViewModel.cameraDisplayed ? "video-camera" : "video-camera-slash") + Image(telecomManager.remoteVideo ? "video-camera" : "video-camera-slash") .renderingMode(.template) .resizable() .foregroundStyle((callViewModel.isPaused || telecomManager.isPausedByRemote) ? Color.gray500 : .white) diff --git a/Linphone/UI/Call/ViewModel/CallViewModel.swift b/Linphone/UI/Call/ViewModel/CallViewModel.swift index 0764d41ec..96f95bbaf 100644 --- a/Linphone/UI/Call/ViewModel/CallViewModel.swift +++ b/Linphone/UI/Call/ViewModel/CallViewModel.swift @@ -32,7 +32,6 @@ class CallViewModel: ObservableObject { @Published var remoteAddress: Address? @Published var avatarModel: ContactAvatarModel? @Published var micMutted: Bool = false - @Published var cameraDisplayed: Bool = false @Published var isRecording: Bool = false @Published var isRemoteRecording: Bool = false @Published var isPaused: Bool = false @@ -58,7 +57,7 @@ class CallViewModel: ObservableObject { if core.currentCall != nil && core.currentCall!.remoteAddress != nil { self.currentCall = core.currentCall DispatchQueue.main.async { - self.direction = .Incoming + self.direction = self.currentCall!.dir self.remoteAddressString = String(self.currentCall!.remoteAddress!.asStringUriOnly().dropFirst(4)) self.remoteAddress = self.currentCall!.remoteAddress! @@ -75,7 +74,6 @@ class CallViewModel: ObservableObject { //self.avatarModel = ??? self.micMutted = self.currentCall!.microphoneMuted - self.cameraDisplayed = self.currentCall!.cameraEnabled == true self.isRecording = self.currentCall!.params!.isRecording self.isPaused = self.isCallPaused() self.timeElapsed = 0 diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactInnerActionsFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactInnerActionsFragment.swift index f15e7bd3a..76f69898d 100644 --- a/Linphone/UI/Main/Contacts/Fragments/ContactInnerActionsFragment.swift +++ b/Linphone/UI/Main/Contacts/Fragments/ContactInnerActionsFragment.swift @@ -48,6 +48,7 @@ struct ContactInnerActionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c600) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } .padding(.top, 30) .padding(.bottom, 10) @@ -82,6 +83,7 @@ struct ContactInnerActionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c600) .frame(width: 25, height: 25) + .padding(.all, 10) } .padding(.vertical, 15) .padding(.horizontal, 20) @@ -222,6 +224,7 @@ struct ContactInnerActionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c600) .frame(width: 25, height: 25) + .padding(.all, 10) Text("Edit") .default_text_style(styleSize: 14) @@ -245,6 +248,7 @@ struct ContactInnerActionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c600) .frame(width: 25, height: 25) + .padding(.all, 10) Text("Edit") .default_text_style(styleSize: 14) @@ -285,6 +289,7 @@ struct ContactInnerActionsFragment: View { .foregroundStyle(contactViewModel.indexDisplayedFriend != nil && contactsManager.lastSearch[contactViewModel.indexDisplayedFriend!].friend != nil && contactsManager.lastSearch[contactViewModel.indexDisplayedFriend!].friend!.starred == true ? Color.redDanger500 : Color.grayMain2c500) .frame(width: 25, height: 25) + .padding(.all, 10) Text(contactViewModel.indexDisplayedFriend != nil && contactsManager.lastSearch[contactViewModel.indexDisplayedFriend!].friend != nil && contactsManager.lastSearch[contactViewModel.indexDisplayedFriend!].friend!.starred == true @@ -314,6 +319,7 @@ struct ContactInnerActionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c600) .frame(width: 25, height: 25) + .padding(.all, 10) Text("Share") .default_text_style(styleSize: 14) @@ -340,6 +346,7 @@ struct ContactInnerActionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c600) .frame(width: 25, height: 25) + .padding(.all, 10) Text("Mute") .default_text_style(styleSize: 14) @@ -365,6 +372,7 @@ struct ContactInnerActionsFragment: View { .resizable() .foregroundStyle(Color.grayMain2c600) .frame(width: 25, height: 25) + .padding(.all, 10) Text("Block") .default_text_style(styleSize: 14) @@ -394,6 +402,7 @@ struct ContactInnerActionsFragment: View { .resizable() .foregroundStyle(Color.redDanger500) .frame(width: 25, height: 25) + .padding(.all, 10) Text("Delete this contact") .foregroundStyle(Color.redDanger500) diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactInnerFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactInnerFragment.swift index 72d4baece..0103f233a 100644 --- a/Linphone/UI/Main/Contacts/Fragments/ContactInnerFragment.swift +++ b/Linphone/UI/Main/Contacts/Fragments/ContactInnerFragment.swift @@ -57,7 +57,9 @@ struct ContactInnerFragment: View { .resizable() .foregroundStyle(Color.orangeMain500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) .padding(.top, 2) + .padding(.leading, -10) .onTapGesture { withAnimation { contactViewModel.indexDisplayedFriend = nil @@ -78,6 +80,7 @@ struct ContactInnerFragment: View { .resizable() .foregroundStyle(Color.orangeMain500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) .padding(.top, 2) }) } else { @@ -91,6 +94,7 @@ struct ContactInnerFragment: View { .resizable() .foregroundStyle(Color.orangeMain500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) .padding(.top, 2) } .simultaneousGesture( diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactListBottomSheet.swift b/Linphone/UI/Main/Contacts/Fragments/ContactListBottomSheet.swift index c9fa76b1b..f9c006e0a 100644 --- a/Linphone/UI/Main/Contacts/Fragments/ContactListBottomSheet.swift +++ b/Linphone/UI/Main/Contacts/Fragments/ContactListBottomSheet.swift @@ -79,6 +79,7 @@ struct ContactListBottomSheet: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text(contactViewModel.stringToCopy.prefix(4) == "sip:" ? "Copy address" : "Copy number") .default_text_style(styleSize: 16) @@ -114,6 +115,7 @@ struct ContactListBottomSheet: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text("Invitation") .default_text_style(styleSize: 16) Spacer() @@ -143,6 +145,7 @@ struct ContactListBottomSheet: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text(contactViewModel.stringToCopy.prefix(4) == "sip:" ? "Block the address" : "Block the number") .default_text_style(styleSize: 16) diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift index 6833bd144..ee46863d0 100644 --- a/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift +++ b/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift @@ -44,6 +44,7 @@ struct ContactsInnerFragment: View { .resizable() .foregroundStyle(Color.grayMain2c600) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } .padding(.top, 30) .padding(.horizontal, 16) diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactsListBottomSheet.swift b/Linphone/UI/Main/Contacts/Fragments/ContactsListBottomSheet.swift index 644e6f16c..0237a5990 100644 --- a/Linphone/UI/Main/Contacts/Fragments/ContactsListBottomSheet.swift +++ b/Linphone/UI/Main/Contacts/Fragments/ContactsListBottomSheet.swift @@ -87,6 +87,7 @@ struct ContactsListBottomSheet: View { : Color.grayMain2c500 ) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text(contactViewModel.selectedFriend != nil && contactViewModel.selectedFriend!.starred == true ? "Remove from favourites" : "Add to favourites") @@ -129,6 +130,7 @@ struct ContactsListBottomSheet: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text("Share") .default_text_style(styleSize: 16) Spacer() @@ -166,6 +168,7 @@ struct ContactsListBottomSheet: View { .resizable() .foregroundStyle(Color.redDanger500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text("Delete") .foregroundStyle(Color.redDanger500) .default_text_style(styleSize: 16) diff --git a/Linphone/UI/Main/Contacts/Fragments/EditContactFragment.swift b/Linphone/UI/Main/Contacts/Fragments/EditContactFragment.swift index 9c85f1873..01ae1fcfe 100644 --- a/Linphone/UI/Main/Contacts/Fragments/EditContactFragment.swift +++ b/Linphone/UI/Main/Contacts/Fragments/EditContactFragment.swift @@ -88,7 +88,9 @@ struct EditContactFragment: View { .resizable() .foregroundStyle(Color.orangeMain500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) .padding(.top, 2) + .padding(.leading, -10) .onTapGesture { if editContactViewModel.selectedEditFriend == nil && editContactViewModel.firstName.isEmpty @@ -130,6 +132,7 @@ struct EditContactFragment: View { .resizable() .foregroundStyle(editContactViewModel.firstName.isEmpty ? Color.orangeMain100 : Color.orangeMain500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) .padding(.top, 2) .disabled(editContactViewModel.firstName.isEmpty) .onTapGesture { @@ -346,6 +349,7 @@ struct EditContactFragment: View { : Color.grayMain2c600 ) .frame(width: 25, height: 25) + .padding(.all, 10) }) .disabled(editContactViewModel.sipAddresses[index].isEmpty && editContactViewModel.sipAddresses.count == index + 1) .frame(maxHeight: .infinity) @@ -394,6 +398,7 @@ struct EditContactFragment: View { : Color.grayMain2c600 ) .frame(width: 25, height: 25) + .padding(.all, 10) }) .disabled(editContactViewModel.phoneNumbers[index].isEmpty && editContactViewModel.phoneNumbers.count == index + 1) .frame(maxHeight: .infinity) diff --git a/Linphone/UI/Main/ContentView.swift b/Linphone/UI/Main/ContentView.swift index 92ec3fd72..242aa1d62 100644 --- a/Linphone/UI/Main/ContentView.swift +++ b/Linphone/UI/Main/ContentView.swift @@ -146,6 +146,7 @@ struct ContentView: View { .resizable() .foregroundStyle(.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } Menu { @@ -164,6 +165,7 @@ struct ContentView: View { Image("green-check") .resizable() .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } } } @@ -182,6 +184,7 @@ struct ContentView: View { Image("green-check") .resizable() .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } } } @@ -196,6 +199,7 @@ struct ContentView: View { Image("trash-simple-red") .resizable() .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } } } @@ -205,15 +209,16 @@ struct ContentView: View { .resizable() .foregroundStyle(.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } - .padding(.leading) + .padding(.trailing, 10) .onTapGesture { isMenuOpen = true } } .frame(maxWidth: .infinity) .frame(height: 50) - .padding(.horizontal) + .padding(.leading) .padding(.bottom, 5) .background(Color.orangeMain500) } else { @@ -239,6 +244,8 @@ struct ContentView: View { .resizable() .foregroundStyle(.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) + .padding(.leading, -10) } if #available(iOS 16.0, *) { @@ -305,6 +312,7 @@ struct ContentView: View { .resizable() .foregroundStyle(.white) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } .padding(.leading) } diff --git a/Linphone/UI/Main/Fragments/ToastView.swift b/Linphone/UI/Main/Fragments/ToastView.swift index 565128b7e..ed77961b6 100644 --- a/Linphone/UI/Main/Fragments/ToastView.swift +++ b/Linphone/UI/Main/Fragments/ToastView.swift @@ -31,6 +31,7 @@ struct ToastView: View { .resizable() .renderingMode(.template) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) .foregroundStyle(toastViewModel.toastMessage.contains("Success") ? Color.greenSuccess500 : Color.redDanger500) switch toastViewModel.toastMessage { diff --git a/Linphone/UI/Main/History/Fragments/HistoryContactFragment.swift b/Linphone/UI/Main/History/Fragments/HistoryContactFragment.swift index a2fd12066..a5021b64a 100644 --- a/Linphone/UI/Main/History/Fragments/HistoryContactFragment.swift +++ b/Linphone/UI/Main/History/Fragments/HistoryContactFragment.swift @@ -58,7 +58,9 @@ struct HistoryContactFragment: View { .resizable() .foregroundStyle(Color.orangeMain500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) .padding(.top, 2) + .padding(.leading, -10) .onTapGesture { withAnimation { historyViewModel.displayedCall = nil @@ -122,6 +124,7 @@ struct HistoryContactFragment: View { Image(addressFriend != nil ? "user-circle" : "plus-circle") .resizable() .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } } @@ -150,6 +153,7 @@ struct HistoryContactFragment: View { Image("copy") .resizable() .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } } @@ -171,6 +175,7 @@ struct HistoryContactFragment: View { Image("trash-simple-red") .resizable() .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } } } label: { @@ -179,6 +184,7 @@ struct HistoryContactFragment: View { .resizable() .foregroundStyle(Color.orangeMain500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) } .padding(.leading) .onTapGesture { diff --git a/Linphone/UI/Main/History/Fragments/HistoryListBottomSheet.swift b/Linphone/UI/Main/History/Fragments/HistoryListBottomSheet.swift index fb8dfd731..6c8516695 100644 --- a/Linphone/UI/Main/History/Fragments/HistoryListBottomSheet.swift +++ b/Linphone/UI/Main/History/Fragments/HistoryListBottomSheet.swift @@ -116,6 +116,7 @@ struct HistoryListBottomSheet: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text("See contact") .default_text_style(styleSize: 16) Spacer() @@ -125,6 +126,7 @@ struct HistoryListBottomSheet: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text("Add the contact") .default_text_style(styleSize: 16) Spacer() @@ -175,6 +177,7 @@ struct HistoryListBottomSheet: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text("Copy SIP address") .default_text_style(styleSize: 16) Spacer() @@ -215,6 +218,7 @@ struct HistoryListBottomSheet: View { .resizable() .foregroundStyle(Color.redDanger500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) Text("Delete") .foregroundStyle(Color.redDanger500) .default_text_style(styleSize: 16) diff --git a/Linphone/UI/Main/History/Fragments/HistoryListFragment.swift b/Linphone/UI/Main/History/Fragments/HistoryListFragment.swift index 0fd6a7c9a..5858db1b7 100644 --- a/Linphone/UI/Main/History/Fragments/HistoryListFragment.swift +++ b/Linphone/UI/Main/History/Fragments/HistoryListFragment.swift @@ -159,6 +159,7 @@ struct HistoryListFragment: View { Image("phone") .resizable() .frame(width: 25, height: 25) + .padding(.all, 10) .padding(.trailing, 5) .highPriorityGesture( TapGesture() diff --git a/Linphone/UI/Main/History/Fragments/StartCallFragment.swift b/Linphone/UI/Main/History/Fragments/StartCallFragment.swift index 7a391f3de..29d24fc6b 100644 --- a/Linphone/UI/Main/History/Fragments/StartCallFragment.swift +++ b/Linphone/UI/Main/History/Fragments/StartCallFragment.swift @@ -51,7 +51,9 @@ struct StartCallFragment: View { .resizable() .foregroundStyle(Color.orangeMain500) .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 10) .padding(.top, 2) + .padding(.leading, -10) .onTapGesture { DispatchQueue.global().asyncAfter(deadline: .now() + 0.2) { magicSearch.searchForContacts( @@ -139,6 +141,7 @@ struct StartCallFragment: View { .resizable() .foregroundStyle(Color.grayMain2c500) .frame(width: 25, height: 25) + .padding(.all, 10) }) } }