Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

core: new timeout only if no activity in progress #273

Merged
merged 1 commit into from Aug 3, 2021
Merged

core: new timeout only if no activity in progress #273

merged 1 commit into from Aug 3, 2021

Conversation

andi34
Copy link
Owner

@andi34 andi34 commented Jul 11, 2021

fix #272

Prerequisites checklist

What is the purpose of this pull request? (put an "x" next to an item)

  • Documentation update
  • Bug fix
  • New feature
  • Other, please explain:

What changes did you make? (Give an overview)

Reset the timeout to return to Startpage every second of the Countdown.

@jacques42
Copy link
Collaborator

jacques42 commented Aug 1, 2021

I think it actually won't fix the issue. Reason being I believe is that the resetTimeOut function cancels an existing timeout BUT then starts a new timeout. And then if the timeout time is reasonably short, it will reload the page even if there is something in progress (picture, collage).

// timeOut function
api.resetTimeOut = function () {
clearTimeout(timeOut);
timeOut = setTimeout(function () {
api.reloadPage();
}, timeToLive);
};

The bug will always kick-in where the timeout to reload the page is smaller than the time it takes to process a current activitiy end to end.

I think we should update the resetTimeOut to check whether or not an activity is in progress.

Change-Id: Ib8b2557e1753161098b675428436b41f613f6d21
@andi34 andi34 changed the title core: reset time to return to Startpage on countdown core: new timeout only if no activity in progress Aug 3, 2021
@andi34 andi34 merged commit fbd0b44 into dev Aug 3, 2021
@andi34 andi34 deleted the bug/272 branch August 3, 2021 09:23
DIY89 pushed a commit to DIY89/photobooth that referenced this pull request Jan 20, 2022
…arn/hosted-git-info-2.8.9

build(deps): bump hosted-git-info from 2.8.8 to 2.8.9
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected return to start page
2 participants