From 809cc1f234f35b2b231e35e426877b51ca657c66 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Thu, 16 Mar 2023 08:46:13 +0000 Subject: [PATCH] ios: different speaker buttons on call screen --- apps/ios/Shared/Views/Call/ActiveCallView.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/ios/Shared/Views/Call/ActiveCallView.swift b/apps/ios/Shared/Views/Call/ActiveCallView.swift index e4a9385706..83b3bd5ae3 100644 --- a/apps/ios/Shared/Views/Call/ActiveCallView.swift +++ b/apps/ios/Shared/Views/Call/ActiveCallView.swift @@ -264,7 +264,7 @@ struct ActiveCallOverlay: View { private func endCallButton() -> some View { let cc = CallController.shared - return callButton("phone.down.fill", size: 60) { + return callButton("phone.down.fill", width: 60, height: 60) { if let uuid = call.callkitUUID { cc.endCall(callUUID: uuid) } else { @@ -286,7 +286,7 @@ struct ActiveCallOverlay: View { } private func toggleSpeakerButton() -> some View { - controlButton(call, call.speakerEnabled ? "speaker.fill" : "speaker.slash") { + controlButton(call, call.speakerEnabled ? "speaker.wave.2.fill" : "speaker.wave.1.fill") { Task { client.setSpeakerEnabledAndConfigureSession(!call.speakerEnabled) DispatchQueue.main.async { @@ -317,22 +317,22 @@ struct ActiveCallOverlay: View { @ViewBuilder private func controlButton(_ call: Call, _ imageName: String, _ perform: @escaping () -> Void) -> some View { if call.hasMedia { - callButton(imageName, size: 40, perform) + callButton(imageName, width: 50, height: 38, perform) .foregroundColor(.white) .opacity(0.85) } else { - Color.clear.frame(width: 40, height: 40) + Color.clear.frame(width: 50, height: 38) } } - private func callButton(_ imageName: String, size: CGFloat, _ perform: @escaping () -> Void) -> some View { + private func callButton(_ imageName: String, width: CGFloat, height: CGFloat, _ perform: @escaping () -> Void) -> some View { Button { perform() } label: { Image(systemName: imageName) .resizable() .scaledToFit() - .frame(maxWidth: size, maxHeight: size) + .frame(maxWidth: width, maxHeight: height) } } }