client: update toolbar toggle when user agent releases the wakelock by itself
This commit is contained in:
parent
02cc18395a
commit
dc023def19
1 changed files with 3 additions and 0 deletions
|
|
@ -246,6 +246,9 @@ if (device.is('mobile') || device.is('tablet')) {
|
|||
if ('wakeLock' in navigator) {
|
||||
navigator.wakeLock.request('screen').then((l)=>{
|
||||
wakeLock = l
|
||||
wakeLock.addEventListener("release", ()=>{
|
||||
noSleepState = false
|
||||
})
|
||||
}).catch((err)=>{
|
||||
console.error(`Could not acquire wake lock:\n${err.name}, ${err.message}`)
|
||||
wakeLock = null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue