Theme change bug

This commit is contained in:
Eudes Inácio
2022-07-05 14:37:06 +01:00
parent 1dc0aa5c53
commit 38c169badb
+8 -1
View File
@@ -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)
})
});
}