Skip to content

Commit

Permalink
Synchronise presentations for settings and account modals
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Petersson committed Oct 9, 2023
1 parent 48d6a75 commit c132dc6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
12 changes: 2 additions & 10 deletions ios/MullvadVPN/Coordinators/AccountCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)
}
Expand All @@ -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
)
)
}
Expand Down
6 changes: 1 addition & 5 deletions ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c132dc6

Please sign in to comment.