mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Dismiss a room's window when its flow finishes as there's no longer a reason for it to be alive.
This commit is contained in:
committed by
Stefan Ceriu
parent
ac5b61c973
commit
bb61db285b
@@ -174,6 +174,10 @@ class WindowManager: SecureWindowManagerProtocol {
|
|||||||
func lockOrientation(_ orientation: UIInterfaceOrientationMask) {
|
func lockOrientation(_ orientation: UIInterfaceOrientationMask) {
|
||||||
appDelegate.orientationLock = orientation
|
appDelegate.orientationLock = orientation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func closeAuxiliaryWindow(forType type: WindowManagerWindowType) {
|
||||||
|
dismissWindowAction(value: type)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class PassthroughWindow: UIWindow {
|
private class PassthroughWindow: UIWindow {
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ protocol WindowManagerProtocol: AnyObject, OrientationManagerProtocol {
|
|||||||
func showGlobalSearch()
|
func showGlobalSearch()
|
||||||
|
|
||||||
func hideGlobalSearch()
|
func hideGlobalSearch()
|
||||||
|
|
||||||
|
/// Closes a previously opened window for the given type.
|
||||||
|
func closeAuxiliaryWindow(forType type: WindowManagerWindowType)
|
||||||
}
|
}
|
||||||
|
|
||||||
// sourcery: AutoMockable
|
// sourcery: AutoMockable
|
||||||
|
|||||||
@@ -900,6 +900,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
// iPhone the compact module diffs call the dismissal callback and we present a blank space flow 🙈
|
// iPhone the compact module diffs call the dismissal callback and we present a blank space flow 🙈
|
||||||
if spaceRoomListProxy == nil {
|
if spaceRoomListProxy == nil {
|
||||||
navigationStackCoordinator.setRootCoordinator(nil, animated: false)
|
navigationStackCoordinator.setRootCoordinator(nil, animated: false)
|
||||||
|
flowParameters.windowManager.closeAuxiliaryWindow(forType: .room(roomID: roomProxy.id))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21462,8 +21462,13 @@ class WindowManagerMock: WindowManagerProtocol, @unchecked Sendable {
|
|||||||
}
|
}
|
||||||
var showGlobalSearchCalled: Bool {
|
var showGlobalSearchCalled: Bool {
|
||||||
return showGlobalSearchCallsCount > 0
|
return showGlobalSearchCallsCount > 0
|
||||||
|
var closeAuxiliaryWindowForTypeCalled: Bool {
|
||||||
|
return closeAuxiliaryWindowForTypeCallsCount > 0
|
||||||
}
|
}
|
||||||
var showGlobalSearchClosure: (() -> Void)?
|
var showGlobalSearchClosure: (() -> Void)?
|
||||||
|
var closeAuxiliaryWindowForTypeReceivedType: WindowManagerWindowType?
|
||||||
|
var closeAuxiliaryWindowForTypeReceivedInvocations: [WindowManagerWindowType] = []
|
||||||
|
var closeAuxiliaryWindowForTypeClosure: ((WindowManagerWindowType) -> Void)?
|
||||||
|
|
||||||
func showGlobalSearch() {
|
func showGlobalSearch() {
|
||||||
showGlobalSearchCallsCount += 1
|
showGlobalSearchCallsCount += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user