mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-19 16:13:06 +00:00
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018, 2019 StApps
|
||||
* Copyright (C) 2018-2020 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -17,7 +17,7 @@ import {SplashScreen} from '@ionic-native/splash-screen/ngx';
|
||||
import {StatusBar} from '@ionic-native/status-bar/ngx';
|
||||
import {Platform} from '@ionic/angular';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import {NGXLogger} from 'ngx-logger';
|
||||
import {ConfigProvider} from './modules/config/config.provider';
|
||||
import {SettingsProvider} from './modules/settings/settings.provider';
|
||||
|
||||
@@ -51,13 +51,15 @@ export class AppComponent {
|
||||
* @param translateService TODO
|
||||
* @param settingsProvider TODO
|
||||
* @param configProvider TODO
|
||||
* @param logger An angular logger
|
||||
*/
|
||||
constructor(private readonly platform: Platform,
|
||||
private readonly statusBar: StatusBar,
|
||||
private readonly splashScreen: SplashScreen,
|
||||
private readonly translateService: TranslateService,
|
||||
private readonly settingsProvider: SettingsProvider,
|
||||
private readonly configProvider: ConfigProvider) {
|
||||
private readonly configProvider: ConfigProvider,
|
||||
private readonly logger: NGXLogger) {
|
||||
this.initializeApp();
|
||||
|
||||
// this language will be used as a fallback when a translation isn't found in the current language
|
||||
@@ -84,7 +86,7 @@ export class AppComponent {
|
||||
// @TODO: Issue #43 handle initialisation error and inform user
|
||||
}
|
||||
}
|
||||
await Logger.error(error);
|
||||
this.logger.error(error);
|
||||
}
|
||||
|
||||
// set order of categories in settings
|
||||
@@ -100,7 +102,7 @@ export class AppComponent {
|
||||
const languageCode = (await this.settingsProvider.getValue('profile', 'language')) as string;
|
||||
this.translateService.use(languageCode);
|
||||
} catch (error) {
|
||||
Logger.warn(error);
|
||||
this.logger.warn(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user