From 57dbad7e2e235ccc9757f43c8049e6948ee47b88 Mon Sep 17 00:00:00 2001 From: Arshak Aghakaryan Date: Mon, 10 Jul 2023 07:42:28 +0400 Subject: [PATCH] fix: Initial glitch when picking a photo in upside-down orientation This was caused by OWSViewController.IsLandscapeOrientationEnabled being hard-coded to return `NO`. Now, whether or not landscape orientation is enabled will be based on whether the current device is an iPad. --- .../Shared View Controllers/OWSViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SignalUtilitiesKit/Shared View Controllers/OWSViewController.m b/SignalUtilitiesKit/Shared View Controllers/OWSViewController.m index 6d2ea863b..611174095 100644 --- a/SignalUtilitiesKit/Shared View Controllers/OWSViewController.m +++ b/SignalUtilitiesKit/Shared View Controllers/OWSViewController.m @@ -11,12 +11,12 @@ NS_ASSUME_NONNULL_BEGIN BOOL IsLandscapeOrientationEnabled(void) { - return NO; + return UIDevice.currentDevice.isIPad; } UIInterfaceOrientationMask DefaultUIInterfaceOrientationMask(void) { - return (IsLandscapeOrientationEnabled() ? UIInterfaceOrientationMaskAllButUpsideDown + return (IsLandscapeOrientationEnabled() ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskPortrait); }