From c132dc61486f05575dc29c2b1fe6d3c7b60171b8 Mon Sep 17 00:00:00 2001 From: Jon Petersson Date: Mon, 9 Oct 2023 13:12:19 +0200 Subject: [PATCH] Synchronise presentations for settings and account modals --- ios/MullvadVPN/Coordinators/AccountCoordinator.swift | 12 ++---------- .../Coordinators/ApplicationCoordinator.swift | 6 +----- .../RedeemVoucher/RedeemVoucherContentView.swift | 1 - 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/ios/MullvadVPN/Coordinators/AccountCoordinator.swift b/ios/MullvadVPN/Coordinators/AccountCoordinator.swift index 0338d7427bf1..d6918acc2868 100644 --- a/ios/MullvadVPN/Coordinators/AccountCoordinator.swift +++ b/ios/MullvadVPN/Coordinators/AccountCoordinator.swift @@ -90,11 +90,7 @@ final class AccountCoordinator: Coordinator, Presentable, Presenting { animated: true, configuration: ModalPresentationConfiguration( preferredContentSize: UIMetrics.SettingsRedeemVoucher.preferredContentSize, - modalPresentationStyle: .custom, - transitioningDelegate: FormSheetTransitioningDelegate(options: FormSheetPresentationOptions( - useFullScreenPresentationInCompactWidth: false, - adjustViewWhenKeyboardAppears: true - )) + modalPresentationStyle: .formSheet ) ) } @@ -121,11 +117,7 @@ final class AccountCoordinator: Coordinator, Presentable, Presenting { animated: true, configuration: ModalPresentationConfiguration( preferredContentSize: UIMetrics.AccountDeletion.preferredContentSize, - modalPresentationStyle: .custom, - transitioningDelegate: FormSheetTransitioningDelegate(options: FormSheetPresentationOptions( - useFullScreenPresentationInCompactWidth: true, - adjustViewWhenKeyboardAppears: false - )) + modalPresentationStyle: .formSheet ) ) } diff --git a/ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift b/ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift index 12c4e00478ee..3de34f1515a2 100644 --- a/ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift +++ b/ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift @@ -728,11 +728,7 @@ final class ApplicationCoordinator: Coordinator, Presenting, RootContainerViewCo animated: animated, configuration: ModalPresentationConfiguration( preferredContentSize: UIMetrics.preferredFormSheetContentSize, - modalPresentationStyle: .custom, - transitioningDelegate: FormSheetTransitioningDelegate(options: FormSheetPresentationOptions( - useFullScreenPresentationInCompactWidth: true, - adjustViewWhenKeyboardAppears: false - )) + modalPresentationStyle: .formSheet ) ) { [weak self] in completion(coordinator) diff --git a/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift b/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift index 7075dd7c4d90..e4be77b44174 100644 --- a/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift +++ b/ios/MullvadVPN/View controllers/RedeemVoucher/RedeemVoucherContentView.swift @@ -352,7 +352,6 @@ final class RedeemVoucherContentView: UIView { } private func addKeyboardResponderIfNeeded() { - guard configuration.adjustViewWhenKeyboardAppears else { return } keyboardResponder = AutomaticKeyboardResponder( targetView: self, handler: { [weak self] _, offset in