Skip to content

Coerce created confetti at most emitting time#341

Open
mekutluca wants to merge 1 commit intoDanielMartinus:mainfrom
mekutluca:main
Open

Coerce created confetti at most emitting time#341
mekutluca wants to merge 1 commit intoDanielMartinus:mainfrom
mekutluca:main

Conversation

@mekutluca
Copy link

Closes #340

When the app is taken to the background and launched back after some time, new particles are created for the entire duration.

This PR changes that behavior. Further enhancements can be made, like in the View version, when onVisibilityChanged, timer is reset.

@PaulKlauser
Copy link
Contributor

Yep, this is very similar to the fix I added years ago to the View implementation #289. I'm wondering if this fix should actually be implemented in ConfettiView using a LifecycleEffect to reset the frame time state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deltaMs includes time when the app is on the background

2 participants