* Correctly handle the re-opening of the main window.
Add an additional safe-guard to ensure only one main window exists.
Make sure all secondary windows use the correct tint colour.
* Fix a bug where the settings screen isn't shown on macOS when the AppLock feature is enabled.
Once the app starts the WindowManager is configured with SwiftUI's environment OpenWindowAction. It can then be used to register coordinators (that provide the toPresentable view) and an optional flow coordinator (as most of the screens are part of a flow, especially rooms).
Once a coordinator is registed, the WindowManager invokes the OpenWindowAction which in turn makes the Application call its newly introduced WindowManagerWindowType WindowGroup's block to instantiate a new visual window rooting that view.
The WindowManager is also responsible for wrapping the presentable in a disappearance block and clean up the coordinator stack.
# Conflicts:
# ElementX/Sources/Application/AppCoordinator.swift
- stop using multiple background task, the appCoordinator sync one is enough for the whole app
- move the AppMeditor to the MainActor
- expose the WindowManager through the AppMediator
- hide sensitive WindowManager API behind a different protocol
- remove the now unnecessary `BackgroundTaskService`
* Only use the Task for the delayed window changes.
The timing was off with the Task when locking the device with the app open.
* Check the application state before unlocking the app.
On top of a), the app will reveal itself if you background during the success animation, b) the flow is run farrrr too many times, so the app is revealing itself way before the Face ID scan UI is complete - definitely need a state machine here.