From 7c87bce4715ca291c8e449d9de3d92c69725d45c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 31 Jul 2020 16:55:32 +0200 Subject: Fix anonymous user theme --- client/src/app/core/theme/theme.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'client/src/app/core/theme') diff --git a/client/src/app/core/theme/theme.service.ts b/client/src/app/core/theme/theme.service.ts index 9dbf22e20..7e05fdddd 100644 --- a/client/src/app/core/theme/theme.service.ts +++ b/client/src/app/core/theme/theme.service.ts @@ -111,9 +111,9 @@ export class ThemeService { this.pluginService.reloadLoadedScopes() - this.localStorageService.setItem(User.KEYS.THEME, JSON.stringify(theme), false) + this.localStorageService.setItem(User.KEYS.LAST_ACTIVE_THEME, JSON.stringify(theme), false) } else { - this.localStorageService.removeItem(User.KEYS.THEME, false) + this.localStorageService.removeItem(User.KEYS.LAST_ACTIVE_THEME, false) } this.oldThemeName = currentTheme @@ -127,7 +127,7 @@ export class ThemeService { if (!this.auth.isLoggedIn()) { this.updateCurrentTheme() - this.localStorageService.watch([User.KEYS.THEME]).subscribe( + this.localStorageService.watch([ User.KEYS.THEME ]).subscribe( () => this.updateCurrentTheme() ) } @@ -138,7 +138,7 @@ export class ThemeService { } private loadAndSetFromLocalStorage () { - const lastActiveThemeString = this.localStorageService.getItem(User.KEYS.THEME) + const lastActiveThemeString = this.localStorageService.getItem(User.KEYS.LAST_ACTIVE_THEME) if (!lastActiveThemeString) return try { -- cgit v1.2.3