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) + }) }); }