Prevent the window manager from being setup more than once.

This commit is contained in:
Stefan Ceriu
2026-03-30 09:51:15 +03:00
committed by Stefan Ceriu
parent b034fffb1f
commit a33c2b6f39

View File

@@ -39,6 +39,12 @@ class WindowManager: SecureWindowManagerProtocol {
}
func configure(with windowScene: UIWindowScene) {
// This gets called for all opened windows, we're only interested in the
// first call, for the main window (works with state restoration too).
guard mainWindow == nil else {
return
}
self.windowScene = windowScene
mainWindow = windowScene.keyWindow
mainWindow.tintColor = .compound.textActionPrimary