diff --git a/ui/src/app/modals/os-welcome/os-welcome.page.ts b/ui/src/app/modals/os-welcome/os-welcome.page.ts index 8cc7a4d70..bb64d7aad 100644 --- a/ui/src/app/modals/os-welcome/os-welcome.page.ts +++ b/ui/src/app/modals/os-welcome/os-welcome.page.ts @@ -21,7 +21,6 @@ export class OSWelcomePage { private readonly config: ConfigService, ) { } - // autoCheckUpdates default must be false when upgrading to async dismiss () { this.apiService .patchServerConfig('autoCheckUpdates', this.autoCheckUpdates) diff --git a/ui/src/app/services/startup-alerts.notifier.ts b/ui/src/app/services/startup-alerts.notifier.ts index ad8127d5b..ed274f4fa 100644 --- a/ui/src/app/services/startup-alerts.notifier.ts +++ b/ui/src/app/services/startup-alerts.notifier.ts @@ -27,8 +27,9 @@ export class StartupAlertsNotifier { async handleSpecial (server: Readonly): Promise { if (this.needsWelcomeMessage(server)) { - await this.handleOSWelcome(server) - if (this.needsAppsCheck(server)) await this.handleAppsCheck() + const serverUpdates = await this.handleOSWelcome(server) + if (this.needsAppsCheck({ ...server, ...serverUpdates })) await this.handleAppsCheck() + return } if (this.needsOSCheck(server)) { @@ -43,6 +44,7 @@ export class StartupAlertsNotifier { } needsAppsCheck (server: S9Server): boolean { + console.log('server', server) return server.autoCheckUpdates && !this.checkedAppsForUpdates } @@ -50,7 +52,7 @@ export class StartupAlertsNotifier { return server.autoCheckUpdates && !this.checkedOSForUpdates } - private async handleOSWelcome (server: Readonly): Promise { + private async handleOSWelcome (server: Readonly): Promise> { this.displayedWelcomeMessage = true return new Promise(async resolve => { @@ -64,7 +66,7 @@ export class StartupAlertsNotifier { }) await modal.present() - modal.onWillDismiss().then(() => resolve()) + modal.onWillDismiss().then(res => resolve(res.data)) }) } @@ -74,7 +76,7 @@ export class StartupAlertsNotifier { const { versionLatest } = await this.apiService.getVersionLatest() if (this.osUpdateService.updateIsAvailable(server.versionInstalled, versionLatest)) { - const { update } = await this.presentAlertNewOS(server.versionLatest) + const { update } = await this.presentAlertNewOS(versionLatest) if (update) { await this.loader.displayDuringP( this.osUpdateService.updateEmbassyOS(versionLatest),