Skip to content

Commit

Permalink
feat(SwiftUI App Lifecycle): Restore orientation lock behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann committed Jul 6, 2023
1 parent 5ee2dfc commit d93b65f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Mail/Views/Onboarding/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class LoginHandler: InfomaniakLoginDelegate, ObservableObject {
_ = try await AccountManager.instance.createAndSetCurrentAccount(code: code, codeVerifier: verifier)
UIApplication.shared.registerForRemoteNotifications()
} catch let error as MailError where error == MailError.noMailbox {
//sceneDelegate?.showNoMailboxView()
// sceneDelegate?.showNoMailboxView()
} catch {
if let previousAccount = previousAccount {
AccountManager.instance.switchAccount(newAccount: previousAccount)
Expand Down Expand Up @@ -241,7 +241,7 @@ struct OnboardingView: View {
if UIDevice.current.userInterfaceIdiom == .phone {
UIDevice.current
.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation")
// AppDelegate.orientationLock = .portrait
AppDelegate.orientationLock = .portrait
UIViewController.attemptRotationToDeviceOrientation()
}
}
Expand Down
2 changes: 1 addition & 1 deletion Mail/Views/Switch User/AccountListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct AccountListView: View {
isShowingNewAccountView = true
}
.fullScreenCover(isPresented: $isShowingNewAccountView, onDismiss: {
// AppDelegate.orientationLock = .all
AppDelegate.orientationLock = .all
}, content: {
OnboardingView(page: 4, isScrollEnabled: false)
})
Expand Down

0 comments on commit d93b65f

Please sign in to comment.