Use store to get nosleep setting in map view
This commit is contained in:
parent
e9b4f41b1e
commit
8921833619
@ -155,14 +155,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setNoSleep() {
|
setNoSleep() {
|
||||||
let preventSuspend = localStorage.getItem('preventSuspend');
|
if (this.$store.state.settings.preventSuspend) {
|
||||||
if (preventSuspend) {
|
|
||||||
preventSuspend = JSON.parse(preventSuspend);
|
|
||||||
} else {
|
|
||||||
preventSuspend = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (preventSuspend) {
|
|
||||||
this.noSleep = new NoSleep();
|
this.noSleep = new NoSleep();
|
||||||
this.noSleep.enable();
|
this.noSleep.enable();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user