Closed rexxars closed 4 years ago
This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/rix1/46brew/3vpdx6sto ✅ Preview: https://46brew-git-fork-rexxars-wake-lock.rix1.now.sh
Merging this now. Let me know what you think about removing the event handler @rexxars and I can add it later :)
I honestly wasn't aware that this API existed. It's been a major pain for me as I developed a habit of tapping the screen every 29 seconds 😅
It's still an experimental feature, but it's "intent to ship" and implemented behind experimental features in chrome, so should be available in maybe ~Chrome 84?
I've manually enabled the feature flag in my Chrome for now, and it seems to be working nicely 👍
It's kind of annoying when you're brewing and the display turns off. This PR adds support for the (experimental) wake lock API to prevent it from sleeping while the brew process is ongoing.
I'm not sure the
useBrewTracker
hook is the best place to put it, so feel free to point me in the right direction if it isn't!