Lottie animation keeps running in background

Good morning everyone,

I have a Lottie animation on one screen that triggers an action and links to a second screen when the animation ends.

Now, when I leave for a third screen via the tab bar while the animation is still running the animation apparently continues in the background and whisks me away to the second screen (the one the Lottie animation is linking to), once it has ended.

Any idea how I can prevent this?

Thank you,
Stefan

EDIT: I just noticed that the same thing happens, when there is the Countdown component from NoCode Monkey running, so I’ll rephrase my question to: how can I get processes to stop once I leave the screen they are placed at?

Hi Stefan @Stefan76,

You can try the following:

  • make Lottie / Countdown conditionally visible based on some variable (e.g. Logged-in User → Lottie Visible, T/F)
  • set this variable to True before going to Lottie screen
  • set this variable to False upon entering the next screen.

One interesting thing which I’ve observed (with Timer, but I think Lottie may behave the same) is that when the screen with this component is visited once, the component seem to remain “active”, and with visibility conditions you can turn it “on” or “off” (and the countdown finished actions are run again).
Though I’m not really sure how stable is this and therefore avoid using such things in my apps :slight_smile:

Best regards, Victor.

2 Likes

Thank you, Victor – that’s just what I did. Had to build a pretty involved conditional Boolean setup, but it seems to work.

I’d love for everything to be disabled/reset though when leaving a screen or at least an option to make it so.

Have a great day!

1 Like

Hi Stefan @Stefan76,

Great to know that it worked for you.
If you feel like you need such feature - please don’t hesitate to leave the request here https://adalo.canny.io/ - or may be there is one already :slight_smile:

Best,
Victor

1 Like

Submitted the request.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.