Closed ammerzon closed 3 months ago
Hi @ammerzon, this is just how SwiftUI works. If you were to recreate the demo in vanilla SwiftUI you would find that you cannot present a sheet until the existing sheet has fully dismissed.
Since this isn't an issue with the library I am going to convert it to a discussion. Please feel free to continue the conversation over there!
Description
I am unsure if this is a bug or standard SwiftUI behavior. It might be related to issue #3045.
Here's a simple example: on a home screen, when a button is clicked, a sheet opens. After dismissing the sheet, clicking the button again doesn't work immediately; there is a delay of a few seconds before it responds. I suspect the state hasn't changed to
nil
, preventing the sheet from opening immediately. Is this a known issue?Checklist
main
branch of this package.Expected behavior
The sheet opens the first time a button is clicked after dismissing the sheet.
Actual behavior
The sheet can't be shown immediately again, but the user must wait a bit.
Steps to reproduce
https://github.com/pointfreeco/swift-composable-architecture/assets/7319168/0ec58569-62bd-434f-9415-6b83b861a9d9
Sheet Bug Project.zip
The Composable Architecture version information
1.11.2
Destination operating system
iOS 17.5
Xcode version information
15.4
Swift Compiler version information