diff --git a/src/App.vue b/src/App.vue index 01f978a3..88e46c2a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -31,7 +31,7 @@ export default { methods: { ...mapActions(useScheduleStore, ['initializeSchedule', 'pageLoaded']), ...mapActions(useThemeStore, ['initializeTheme']), - ...mapActions(useUserSettingsStore, ['initializeGrade']), + ...mapActions(useUserSettingsStore, ['initializeGrade', 'initializeShowPWCSchedule']), }, watch: { theme() { @@ -48,6 +48,7 @@ export default { this.initializeSchedule(this.$route); this.initializeTheme(); this.initializeGrade(); + this.initializeShowPWCSchedule(); this.pageLoaded(this.$route); document.querySelector('body').style.background = this.theme.background; }, diff --git a/src/stores/user-settings.ts b/src/stores/user-settings.ts index ce03d7ac..d76673cd 100644 --- a/src/stores/user-settings.ts +++ b/src/stores/user-settings.ts @@ -17,9 +17,8 @@ export default defineStore('grades', { } }, initializeShowPWCSchedule(): void { - if (localStorage.showPWCSchedule) { - this.setShowPWCSchedule(localStorage.showPWCSchedule === 'true'); - } + console.log(localStorage.showPWCSchedule); + this.setShowPWCSchedule(localStorage.showPWCSchedule === 'true'); }, setGrade(grade: string): void { this.grade = grade; diff --git a/src/views/Settings/General.vue b/src/views/Settings/General.vue index af1cc6fa..c44d5abb 100644 --- a/src/views/Settings/General.vue +++ b/src/views/Settings/General.vue @@ -2,7 +2,7 @@