head end timing for loadInstalledApp

This commit is contained in:
Aaron Greenspan
2020-12-07 16:27:57 -07:00
committed by Keagan McClelland
parent 95a0bfdd1e
commit c4fe73398e
3 changed files with 5 additions and 3 deletions

View File

@@ -50,8 +50,9 @@ export class ModelPreload {
}
loadInstalledApp (appId: string): Promise<PropertySubject<AppInstalledFull>> {
const now = new Date()
return this.api.getInstalledApp(appId).then(res => {
this.appModel.update({ id: appId, ...res, hasFetchedFull: true })
this.appModel.update({ id: appId, ...res, hasFetchedFull: true }, now)
return this.appModel.watch(appId)
})
}

View File

@@ -205,7 +205,7 @@ export class AppConfigPage extends Cleanup {
}
return this.apiService.patchAppConfig(app, config).then(
() => this.preload.loadInstalledApp(this.appId).then(() => ({ skip: false})),
() => this.preload.loadInstalledApp(this.appId).then(() => ({ skip: false })),
)
})
.then(({ skip }) => {

View File

@@ -255,4 +255,5 @@ type HttpError = HttpErrorResponse & { error: { code: string, message: string }
const dryRunParam = (dryRun: boolean, first: boolean) => {
if (!dryRun) return ''
return first ? `?dryrun` : `&dryrun`
}
}