Use store to get nosleep setting in map view

This commit is contained in:
Lucas Verney 2018-07-17 16:22:18 +02:00
parent e9b4f41b1e
commit 8921833619

View File

@ -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();
}