momentumfrc / attendance-manager

Keep track of the attendence of our team members by allowing mentors to check students in and out.
0 stars 0 forks source link

Missed events on mobile when app is not active #52

Closed lost1227 closed 1 year ago

lost1227 commented 1 year ago

On mobile, if the web browser running the attendance app is minimized or the phone is put to sleep, the event polling will not occur. This can cause desync if events occur while the phone is asleep, as the phone is not polling while asleep.

The solution is to remember the timestamp of the last poll and use that to determine the time interval of updates to ask for, instead of assuming that the phone was active a second ago and always polling for the previous second's events.