mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Disable multiple windows when screen lock is enabled.
This commit is contained in:
committed by
Stefan Ceriu
parent
b7333b9b5f
commit
3b858a4073
@@ -22,6 +22,14 @@ class WindowManager: SecureWindowManagerProtocol {
|
||||
|
||||
private(set) var openWindowAction: OpenWindowAction!
|
||||
private(set) var dismissWindowAction: DismissWindowAction!
|
||||
|
||||
var auxiliaryWindowsEnabled = true {
|
||||
didSet {
|
||||
if auxiliaryWindowsEnabled == false {
|
||||
closeAllAuxiliaryWindows()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var windows: [UIWindow] {
|
||||
[mainWindow, overlayWindow, globalSearchWindow, alternateWindow]
|
||||
@@ -167,6 +175,11 @@ class WindowManager: SecureWindowManagerProtocol {
|
||||
}
|
||||
|
||||
func registerCoordinator(_ coordinator: CoordinatorProtocol, flowCoordinator: FlowCoordinatorProtocol?, forWindowType type: WindowManagerWindowType) {
|
||||
if auxiliaryWindowsEnabled == false {
|
||||
MXLog.error("Cannot register coordinator, auxiliary windows are disabled.")
|
||||
return
|
||||
}
|
||||
|
||||
coordinators[type] = (coordinator, flowCoordinator)
|
||||
openWindowAction(value: type)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user