Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timers are not always stopped when leaving a page #583

Merged
merged 1 commit into from
Nov 2, 2024
Merged

Conversation

erwindon
Copy link
Owner

@erwindon erwindon commented May 11, 2024

Describe the bug
When leaving a page, the associated timer-sequence continues.
In some cases, returning to the page starts a new timer, causing multiple timers to be active.

To Reproduce
tbd

Expected behaviour
Page/panel-related timers must be stopped when leaving the page.
See e.g. options.js. function onHide.

Additional context
one positive factor: most timer-sequences are not infinite sequences.

proposal to create panelTimerHelper function.
timer is registered in Panel.
timer is disabled when isFinished=true, or when onHide is called
parameters:

  • actionCallback function
  • runFirstTime flag, runs the callback extra immediately
  • isFinished function, signals that no more runs are needed
  • isSkipped function, signals that this run is not needed
  • playPause setting is always considered for skipping the function
  • playPause will be hidden when isFinished=true

@erwindon erwindon added the bug label May 11, 2024
@erwindon erwindon self-assigned this May 11, 2024
@erwindon erwindon changed the title timers are not alway stopped when leaving a page timers are not always stopped when leaving a page May 11, 2024
@erwindon erwindon marked this pull request as draft May 11, 2024 20:12
Repository owner deleted a comment from sonarcloud bot Oct 22, 2024
Repository owner deleted a comment from sonarcloud bot Oct 22, 2024
@erwindon erwindon force-pushed the timers-off branch 2 times, most recently from 1498561 to 864ecd6 Compare October 27, 2024 21:52
@erwindon erwindon force-pushed the timers-off branch 4 times, most recently from 182b34d to bd4a3ab Compare November 2, 2024 00:36
Copy link

sonarcloud bot commented Nov 2, 2024

@erwindon erwindon marked this pull request as ready for review November 2, 2024 16:52
@erwindon
Copy link
Owner Author

erwindon commented Nov 2, 2024

no library added, just plain fixes.

@erwindon erwindon merged commit 2a07c05 into master Nov 2, 2024
4 checks passed
@erwindon erwindon deleted the timers-off branch November 2, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant