ui: backup fin state ignore unreachable

This commit is contained in:
Aaron Greenspan
2021-01-14 15:37:19 -07:00
committed by Aiden McClelland
parent 2022a7fc1d
commit 73d40c71ad

View File

@@ -53,6 +53,7 @@ export class AppModel extends MapSubject<AppInstalledFull> {
if (!toWatch) return of(undefined) if (!toWatch) return of(undefined)
return toWatch.status.pipe( return toWatch.status.pipe(
filter(s => s !== AppStatus.UNREACHABLE && s !== AppStatus.UNKNOWN),
pairwise(), pairwise(),
filter( ([old, _]) => old === AppStatus.INSTALLING ), filter( ([old, _]) => old === AppStatus.INSTALLING ),
take(1), take(1),
@@ -60,12 +61,13 @@ export class AppModel extends MapSubject<AppInstalledFull> {
) )
} }
// when an app is installing // when an app is backing up
watchForBackup (appId: string): Observable<string | undefined> { watchForBackup (appId: string): Observable<string | undefined> {
const toWatch = super.watch(appId) const toWatch = super.watch(appId)
if (!toWatch) return of(undefined) if (!toWatch) return of(undefined)
return toWatch.status.pipe( return toWatch.status.pipe(
filter(s => s !== AppStatus.UNREACHABLE && s !== AppStatus.UNKNOWN),
pairwise(), pairwise(),
filter( ([old, _]) => old === AppStatus.CREATING_BACKUP), filter( ([old, _]) => old === AppStatus.CREATING_BACKUP),
take(1), take(1),