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() {
|
||||
let preventSuspend = localStorage.getItem('preventSuspend');
|
||||
if (preventSuspend) {
|
||||
preventSuspend = JSON.parse(preventSuspend);
|
||||
} else {
|
||||
preventSuspend = true;
|
||||
}
|
||||
|
||||
if (preventSuspend) {
|
||||
if (this.$store.state.settings.preventSuspend) {
|
||||
this.noSleep = new NoSleep();
|
||||
this.noSleep.enable();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user