Best effort attempt at cleaning up the WindowManger registered coordinators.

This commit is contained in:
Stefan Ceriu
2026-03-30 09:52:04 +03:00
committed by Stefan Ceriu
parent a33c2b6f39
commit aae95a9489

View File

@@ -89,7 +89,11 @@ class WindowManager: SecureWindowManagerProtocol {
return AnyView(InstantlyDismissingWindow())
}
return coordinator.toPresentable()
// This behaves strangely and gets called late but cleans up enough
// and is self contained enough to be just good .. enough
return AnyView(coordinator.toPresentable().onDisappear { [weak self] in
self?.coordinators[type] = nil
})
}
func handleRoute(_ appRoute: AppRoute, windowType: WindowManagerWindowType) {