Remove the global UserIndicatorController.alertInfo, replacing it with local alertInfo usage. (#5087)

This commit is contained in:
Doug
2026-02-10 17:16:11 +00:00
committed by GitHub
parent b725d8be80
commit 071a1eeb52
21 changed files with 101 additions and 71 deletions
@@ -67,6 +67,9 @@ import SwiftUI
overlayModule?.coordinator
}
/// The lowest-level `AlertInfo`, directly available to the root of the app.
var alertInfo: AlertInfo<UUID>?
/// Sets or replaces the presented coordinator
/// - Parameter coordinator: the coordinator to display
func setRootCoordinator(_ coordinator: (any CoordinatorProtocol)?, animated: Bool = true, dismissalCallback: (() -> Void)? = nil) {
@@ -159,6 +162,7 @@ private struct NavigationRootCoordinatorView: View {
ZStack {
rootCoordinator.rootModule?.coordinator?.toPresentable()
}
.alert(item: $rootCoordinator.alertInfo)
.animation(.elementDefault, value: rootCoordinator.rootModule)
.sheet(item: $rootCoordinator.sheetModule) { module in
module.coordinator?.toPresentable()