Pow
Pow copied to clipboard
Avoid reapplying all RepeatingChangeEffectModifier changes in each onAppear
When using an effect as RepeatingChangeEffectModifier
inside a lazy stack, it is possible that onAppear
is called multiple times when the view comes back to being visible. That would cause the shine effect to repeat RepeatingChangeEffectModifier.timer.count
times when becoming visible again. This PR tries to fix this by pausing/resetting the timer count when the view disappears. I hope this is the correct way to solve this 🙂
|
https://github.com/EmergeTools/Pow/assets/9310224/67531f90-04d9-476d-a283-ada50ec78ebb |