load once and cache

This commit is contained in:
Substancia 2023-10-09 15:01:00 +05:30
parent 1db6722670
commit 15d7f5d348
3 changed files with 9 additions and 2 deletions

View file

@ -335,6 +335,7 @@ export default {
*/ */
saveGeneral() { saveGeneral() {
localStorage.timezone = this.$root.userTimezone; localStorage.timezone = this.$root.userTimezone;
this.$root.use12HourTimeFormat = this.settings.use12HourTimeFormat;
this.saveSettings(); this.saveSettings();
}, },
/** /**

View file

@ -113,8 +113,11 @@ export default {
}, },
}, },
mounted() { created() {
this.loadSettings(); this.loadSettings();
},
mounted() {
this.getImportantHeartbeatListLength(); this.getImportantHeartbeatListLength();
this.$root.emitter.on("newImportantHeartbeat", this.onNewImportantHeartbeat); this.$root.emitter.on("newImportantHeartbeat", this.onNewImportantHeartbeat);

View file

@ -413,8 +413,11 @@ export default {
}, },
}, },
mounted() { created() {
this.loadSettings(); this.loadSettings();
},
mounted() {
this.getImportantHeartbeatListLength(); this.getImportantHeartbeatListLength();
this.$root.emitter.on("newImportantHeartbeat", this.onNewImportantHeartbeat); this.$root.emitter.on("newImportantHeartbeat", this.onNewImportantHeartbeat);