diff options
author | dartcafe <github@dartcafe.de> | 2021-02-27 16:21:22 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-02-27 16:21:22 +0300 |
commit | 45ca1fa8e97ccf6e35fe5a2516b6b68b04f87a3d (patch) | |
tree | 88c745ccf9535d1ce59ce41d6b9a97d89fe11b75 /src/js/components/Settings | |
parent | 09be13f03bcb7b149d6e942ead21949eb7975af1 (diff) |
js code maintenance and tidy
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/Settings')
-rw-r--r-- | src/js/components/Settings/ExpertimantalSettings.vue | 4 | ||||
-rw-r--r-- | src/js/components/Settings/FeatureSettings.vue | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/js/components/Settings/ExpertimantalSettings.vue b/src/js/components/Settings/ExpertimantalSettings.vue index 032ca192..345ba767 100644 --- a/src/js/components/Settings/ExpertimantalSettings.vue +++ b/src/js/components/Settings/ExpertimantalSettings.vue @@ -140,8 +140,8 @@ export default { }, methods: { - writeValue(value) { - this.$store.commit('settings/setPreference', value) + async writeValue(value) { + await this.$store.commit('settings/setPreference', value) this.$store.dispatch('settings/write') }, }, diff --git a/src/js/components/Settings/FeatureSettings.vue b/src/js/components/Settings/FeatureSettings.vue index f3e50c25..5a6e7fcd 100644 --- a/src/js/components/Settings/FeatureSettings.vue +++ b/src/js/components/Settings/FeatureSettings.vue @@ -130,16 +130,16 @@ export default { }, methods: { - writeValue(value) { - this.$store.commit('settings/setPreference', value) + async writeValue(value) { + await this.$store.commit('settings/setPreference', value) this.$store.dispatch('settings/write') }, - clickedCalendar(calendar) { + async clickedCalendar(calendar) { if (this.settings.checkCalendars.includes(calendar.key)) { - this.writeValue({ checkCalendars: this.settings.checkCalendars.filter(item => item !== calendar.key.toString()) }) + await this.writeValue({ checkCalendars: this.settings.checkCalendars.filter(item => item !== calendar.key.toString()) }) } else { - this.$store.commit('settings/addCheckCalendar', { calendar: calendar }) + await this.$store.commit('settings/addCheckCalendar', { calendar: calendar }) } this.$store.dispatch('settings/write') }, |