mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
Lock screen rotation for the camera (#2353)
This commit is contained in:
@@ -22,8 +22,9 @@ enum AppDelegateCallback {
|
||||
case failedToRegisteredNotifications(error: Error)
|
||||
}
|
||||
|
||||
class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
final class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
let callbacks = PassthroughSubject<AppDelegateCallback, Never>()
|
||||
var orientationLock = UIInterfaceOrientationMask.all
|
||||
|
||||
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
|
||||
// Add a SceneDelegate to the SwiftUI scene so that we can connect up the WindowManager.
|
||||
@@ -44,4 +45,8 @@ class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
|
||||
callbacks.send(.failedToRegisteredNotifications(error: error))
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
|
||||
orientationLock
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user