Files
Stephen Celis f02fab5000 Allow an alert to present another alert (#3309)
* Allow an alert to present another alert

When we added support for vanilla SwiftUI modifiers, we lost the ability
to present one alert after another because `nil` writes to the alert
bindings unconditionally dismissed the feature, even if the feature was
freshly presented.

This fixes things by suppressing dismissal when the identity of a
presented item has changed.

Fix #3272.

* wip
2024-08-26 15:19:08 -07:00

24 lines
714 B
Swift

public enum TestCase {
case cases(Cases)
case legacy(Legacy)
public enum Cases: String, CaseIterable, Identifiable, RawRepresentable {
case multipleAlerts = "Multiple alerts"
public var id: Self { self }
}
public enum Legacy: String, CaseIterable, Identifiable, RawRepresentable {
case escapedWithViewStore = "Escaped WithViewStore"
case ifLetStore = "IfLetStore"
case forEachBinding = "ForEach Binding"
case navigationStack = "NavigationStack"
case presentation = "Presentation APIs"
case presentationItem = "Presentation Item"
case switchStore = "SwitchStore/CaseLet Warning"
case bindingLocal = "BindingLocal Warning"
public var id: Self { self }
}
}