Closed EccoB closed 4 years ago
Hey and thanks for your contribution! I've rebased and adjusted your changes to work on my Photobooth fork too.
But there's one problem: If I am on the standalone gallery watching pictures in full size and someone else is taking a picture on the Photobooth my page get refreshed which shouldn't happen while I am active on the gallery.
We need to detect touch and mouse events and only refresh the page if there's no activity.
Hey @andi34 and @EccoB. Take a look at core.js for the timetolive variable. That is what you are looking for, to stop refresh on user action.
Thanks @andreknieriem ! Will take a look at in the evening 👍
Hey @andi34 and @andreknieriem Thanks for all your comments. I took a look at the user interaction problem and found it best to introduce a function in core.js that tells weather there is a user interaction pending based on the TimeOut function there. If so, we just skip any further checks and updates as the page nevertheless will be refreshed after the timetolive in core.js
Thanks @EccoB ! I've fixed the lint issues and made the DB check optional available, also adjustable interval via admin panel: https://github.com/andi34/photobooth/pull/121/files
Problem: When the gallery is used standalone, new pictures won't be visible till the user manually refreshes the page.
Solution: Added jQuery script that asks the server weather the database changed, if so the page will be reloaded automatically.
Implementation details: