mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-19 16:13:06 +00:00
Resolve "Error: Database not created"
This commit is contained in:
@@ -18,10 +18,10 @@ import {App, URLOpenListenerEvent} from '@capacitor/app';
|
||||
import {Platform, ToastController} from '@ionic/angular';
|
||||
import {SettingsProvider} from './modules/settings/settings.provider';
|
||||
import {AuthHelperService} from './modules/auth/auth-helper.service';
|
||||
import {ScheduleSyncService} from './modules/background/schedule/schedule-sync.service';
|
||||
import {environment} from '../environments/environment';
|
||||
import {StatusBar, Style} from '@capacitor/status-bar';
|
||||
import {Capacitor} from '@capacitor/core';
|
||||
import {ScheduleSyncService} from './modules/background/schedule/schedule-sync.service';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
@@ -53,7 +53,6 @@ export class AppComponent implements AfterContentInit {
|
||||
* @param zone The angular zone
|
||||
* @param authHelper Helper service for OAuth providers
|
||||
* @param toastController Toast controller
|
||||
* @param scheduleSync TODO
|
||||
*/
|
||||
constructor(
|
||||
private readonly platform: Platform,
|
||||
@@ -62,13 +61,14 @@ export class AppComponent implements AfterContentInit {
|
||||
private readonly zone: NgZone,
|
||||
private readonly authHelper: AuthHelperService,
|
||||
private readonly toastController: ToastController,
|
||||
private readonly scheduleSync: ScheduleSyncService,
|
||||
private readonly scheduleSyncService: ScheduleSyncService,
|
||||
) {
|
||||
void this.initializeApp();
|
||||
}
|
||||
|
||||
ngAfterContentInit() {
|
||||
void this.scheduleSync.enable();
|
||||
ngAfterContentInit(): void {
|
||||
this.scheduleSyncService.init();
|
||||
void this.scheduleSyncService.enable();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,10 +86,10 @@ export class AppComponent implements AfterContentInit {
|
||||
});
|
||||
});
|
||||
this.platform.ready().then(async () => {
|
||||
await this.authInit();
|
||||
if (Capacitor.isNativePlatform()) {
|
||||
await StatusBar.setStyle({style: Style.Dark});
|
||||
}
|
||||
await this.authInit();
|
||||
|
||||
// set order of categories in settings
|
||||
this.settingsProvider.setCategoriesOrder([
|
||||
|
||||
Reference in New Issue
Block a user