-
-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Hey, thanks for the last fix.. <3 super cool project..!
I just noticed another bug while playing around with it hehe
Describe the bug
When navigating back to a view that has a loading state, the onAppear
function is called multiple times. This causes the (repeat-forever) animation to be 'toggled' multiple times.
To Reproduce
Steps to reproduce the behavior:
0. View with skeleton modifier inside a NavigationStack
- Navigate to a detail view
- navigate back to the original view
Expected behavior
The skeleton animation should play normally.
Screenshots
Didn't find any.. can try to reproduce and add one if needed..?
Additional context
The problem is the .toggle()
which is called at onAppear
. I found one solution is to check animate == false
or instead of toggling just setting the value to true
.
For reference, my solution: 64f6246