From 9bc65d556343c33859f0c9b84d272f259355e6a8 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Sat, 18 Feb 2023 07:42:35 +0100 Subject: [PATCH] Enable landscape on iOS --- IceCubesApp.xcodeproj/project.pbxproj | 4 ++-- IceCubesApp/Info.plist | 8 ++++---- .../Timeline/Sources/Timeline/TimelineViewModel.swift | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/IceCubesApp.xcodeproj/project.pbxproj b/IceCubesApp.xcodeproj/project.pbxproj index 1b470179..3410df11 100644 --- a/IceCubesApp.xcodeproj/project.pbxproj +++ b/IceCubesApp.xcodeproj/project.pbxproj @@ -1170,7 +1170,7 @@ "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; IPHONEOS_DEPLOYMENT_TARGET = 16.1; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; @@ -1222,7 +1222,7 @@ "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; IPHONEOS_DEPLOYMENT_TARGET = 16.1; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; diff --git a/IceCubesApp/Info.plist b/IceCubesApp/Info.plist index 996b6f26..77bc1af5 100644 --- a/IceCubesApp/Info.plist +++ b/IceCubesApp/Info.plist @@ -21,14 +21,14 @@ INSendMessageIntent - UIBackgroundModes - - remote-notification - UIAppFonts Atkinson-Hyperlegible-Regular-102.ttf OpenDyslexic-Regular.otf + UIBackgroundModes + + remote-notification + diff --git a/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift b/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift index 099f8a9b..802d536c 100644 --- a/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift +++ b/Packages/Timeline/Sources/Timeline/TimelineViewModel.swift @@ -99,7 +99,7 @@ class TimelineViewModel: ObservableObject { !statuses.contains(where: { $0.id == event.status.id }) { pendingStatusesObserver.pendingStatuses.insert(event.status.id, at: 0) - var newStatus = event.status + let newStatus = event.status if let accountId { if newStatus.mentions.first(where: { $0.id == accountId }) != nil { newStatus.userMentioned = true