From 923f3e3fc5e596239fefc99a0e876b327bcb7336 Mon Sep 17 00:00:00 2001 From: Marissa Le Coz <129999395+marissa-signal@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:54:56 -0400 Subject: [PATCH] Relocate flip cam button when alone in call on iPad --- .../UserInterface/GroupCallViewController.swift | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Signal/Calls/UserInterface/GroupCallViewController.swift b/Signal/Calls/UserInterface/GroupCallViewController.swift index 97be4c5db59..6193d619c44 100644 --- a/Signal/Calls/UserInterface/GroupCallViewController.swift +++ b/Signal/Calls/UserInterface/GroupCallViewController.swift @@ -382,11 +382,15 @@ class GroupCallViewController: UIViewController { view.addSubview(fullscreenLocalMemberAddOnsView) fullscreenLocalMemberAddOnsView.autoPinLeadingToSuperviewMargin() fullscreenLocalMemberAddOnsView.autoPinTrailingToSuperviewMargin() - fullscreenLocalMemberAddOnsView.autoPinEdge( - .bottom, - to: .bottom, - of: bottomVStack - ) + if !UIDevice.current.isIPad { + fullscreenLocalMemberAddOnsView.autoPinEdge( + .bottom, + to: .bottom, + of: bottomVStack + ) + } else { + fullscreenLocalMemberAddOnsView.autoPinEdge(toSuperviewSafeArea: .bottom, withInset: Constants.flipCamButtonTrailingToSuperviewEdgePadding) + } view.addSubview(callControlsConfirmationToastContainerView) callControlsConfirmationToastContainerView.autoHCenterInSuperview() @@ -614,6 +618,7 @@ class GroupCallViewController: UIViewController { private enum Constants { static let spacingTopRaiseHandToastToBottomLocalPip: CGFloat = 12 + static let flipCamButtonTrailingToSuperviewEdgePadding: CGFloat = 34 } private func updateMemberViewFrames(