mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Landscape orientation.
This commit is contained in:
parent
b668237e80
commit
2ddde368ec
3 changed files with 19 additions and 0 deletions
|
@ -957,6 +957,15 @@ static NSTimeInterval launchStartedAt;
|
|||
return UIInterfaceOrientationMaskAllButUpsideDown;
|
||||
}
|
||||
|
||||
if (![self.windowManager isAppWindow:window]) {
|
||||
// iOS uses various windows for animations, transitions, etc.
|
||||
// e.g. _UIInteractiveHighlightEffectWindow,
|
||||
// UITextEffectsWindow.
|
||||
//
|
||||
// We should be permissive with these windows.
|
||||
return UIInterfaceOrientationMaskAllButUpsideDown;
|
||||
}
|
||||
|
||||
if (window == self.windowManager.menuActionsWindow) {
|
||||
return UIInterfaceOrientationMaskAllButUpsideDown;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@ extern const UIWindowLevel UIWindowLevel_Background;
|
|||
|
||||
- (void)setIsScreenBlockActive:(BOOL)isScreenBlockActive;
|
||||
|
||||
- (BOOL)isAppWindow:(UIWindow *)window;
|
||||
|
||||
#pragma mark - Message Actions
|
||||
|
||||
@property (nonatomic, readonly) BOOL isPresentingMenuActions;
|
||||
|
|
|
@ -310,6 +310,14 @@ const UIWindowLevel UIWindowLevel_MessageActions(void)
|
|||
[self ensureWindowState];
|
||||
}
|
||||
|
||||
- (BOOL)isAppWindow:(UIWindow *)window
|
||||
{
|
||||
OWSAssertDebug(window);
|
||||
|
||||
return (window == self.rootWindow || window == self.returnToCallWindow || window == self.callViewWindow
|
||||
|| window == self.menuActionsWindow || window == self.screenBlockingWindow);
|
||||
}
|
||||
|
||||
#pragma mark - Message Actions
|
||||
|
||||
- (BOOL)isPresentingMenuActions
|
||||
|
|
Loading…
Reference in a new issue