From 38c169badbd3b39a5ffee0dd0d230f48c7e66882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Tue, 5 Jul 2022 14:37:06 +0100 Subject: [PATCH] Theme change bug --- src/app/app.component.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 70a50f36e..835ca57dc 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -14,6 +14,7 @@ import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx'; import { StorageService } from 'src/app/services/storage.service'; import { MessageModel } from './models/beast-orm'; import { InativityService } from "src/app/services/inativity.service"; +import { ThemeService } from 'src/app/services/theme.service'; const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { parse: { @@ -45,7 +46,8 @@ export class AppComponent { private sqliteservice: SqliteService, private backgroundservice: BackgroundService, private storageservice: StorageService, - private InativityService: InativityService + private InativityService: InativityService, + public ThemeService: ThemeService, ) { // this.createCacheFolder() this.initializeApp(); @@ -89,6 +91,11 @@ export class AppComponent { this.backgroundservice.offline(); } }) + + this.storageservice.get('theme').then((theme) =>{ + console.log('THEME: ', theme) + this.ThemeService.setTheme(theme) + }) }); }