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.
This commit is contained in:
Arshak Aghakaryan 2023-07-10 07:42:28 +04:00
parent fbdb1ad690
commit 57dbad7e2e
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}