I have a home screen that acts as a splash screen with a 4 second timer that has conditional actions that redirect to 3 different pages (starting page) based on the logged in user’s role. That all works fine.
On the starting page, I also have a link to view their profile and review notifications. If a user views either the profile page or the notifications page and then hits the back button, the starting page is reloaded after 4 seconds.
It appears when I hit the back button, it is restarting the countdown on the home/splash page.
I’ve confirmed there are no other countdown timers on any of the pages or other screen load actions that would trigger this.
Does anyone have an idea of what might be going on and how to fix it? Thanks in advance!
I appreciate the reply. The problem is the screen that I am redirecting back to does not have a countdown. The countdown is actually on the splash screen.
The flow is … Splash Screen (4 second countdown) > Screen 2 (normal page) > Screen 3 (link off of normal page). If I am on Screen 3 and hit the back button to Screen 2, Screen 2 appears and 4 seconds later Screen 2 loads again (as if it is kicking off the countdown from the Splash screen again. Super weird! Ideas?
I always solve that by putting a Boolean value on Timer/Animation visibility. Like a switch. User Loading ON/OFF. Once you are in splash screen, update user loading to on, once animations or timer triggers the link to home, update on OFF. This way you avoid looped actions.
Instead of using logged in user database value, you can also use an input and change his value from 0 to 1, loading will be visible only if 0, once actions triggered change input value to 1.
Appreciate the reply. I implemented a very similar soltuion but the unusual thing is I would not think the back button should trigger the countdown timer on 2 screens back. But thanks again. I have a workaround and it is working great. Thanks to all that offered help!