Closed lionel-alves closed 2 years ago
Thanks for raising this issue @lionel-alves - you're right, this behaviour is not right.
Rather than allowing dismiss()
to be a no-op when there is nothing to dismiss, I've added a utility dismissAll()
, which will dismiss all presentation layers, and won't complain if there's nothing to dismiss. This is in keeping with pop()
and goBack()
which both throw an assertion failure if there is nothing to pop / goBack.
The new API is available in 0.3.0
. Hope that helps your use case!
Hi @johnpatrickmorgan,
Issue: when we call dismiss with only the
.root
node we get a black screen.It can be useful to call dismiss to make sure nothing is presented before presenting something, for example for deep-linking from a push notification. The issue is the dismiss function test if the node
isPresented
if so it removes it, but the.root
node uses a.sheet
soisPreview
is true. Imo dismissing when there is only the root should do nothing. Wdyt?