jotavetech / focus-pocus

FocusPocus is a browser extension created to help you maintain focus on your studies by blocking access to pages that may distract you during focus mode.
MIT License
76 stars 5 forks source link

Bug - Time isn't running #8

Closed mthsaug closed 6 months ago

mthsaug commented 6 months ago

For some reason focus time is not decreasing, sites are being blocked perfectly but time is not running.

https://github.com/jotavetech/focus-pocus/assets/169184240/264a9d80-ffec-4294-adb3-d8a5ef5a5559

jotavetech commented 6 months ago

Thank you mthsaug, I was going to open a issue right now kkkk.

When the browser is closed while the timer is running, it stops working upon reopening because the background interval is not called again. This happens because the service worker is deactivated. We need a way to fix this and either stop the timer or resume it when the browser is reopened.

Sorry for the hassle, I'll try to sort it out as soon as possible.

jotavetech commented 6 months ago

Good morning @mthsaug

I've sent the new version 1.0.2. Please update and try running it to see if everything works correctly now.