Skip to content

Commit

Permalink
NAS-131100: Fix installed apps is empty on app install
Browse files Browse the repository at this point in the history
  • Loading branch information
denysbutenko committed Sep 25, 2024
1 parent b237815 commit 9179593
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/app/pages/apps/services/applications.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class ApplicationsService {
}]);
}

getInstalledAppsUpdates(): Observable<ApiEvent> {
getInstalledAppsUpdates(): Observable<ApiEvent<App>> {
return this.ws.subscribe('app.query');
}

Expand Down
11 changes: 4 additions & 7 deletions src/app/pages/apps/store/installed-apps-store.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,11 @@ export class InstalledAppsStore extends ComponentStore<InstalledAppsState> imple
private loadInstalledApps(): Observable<unknown> {
return this.dockerStore.isLoading$.pipe(
withLatestFrom(this.dockerStore.isDockerStarted$),
filter(([loading, isDockerStarted]) => !loading && isDockerStarted !== null),
tap(([, isDockerStarted]) => {
if (isDockerStarted) {
this.appsStats.subscribeToUpdates();
this.subscribeToInstalledAppsUpdates();
}
}),
filter(([isLoading, isDockerStarted]) => !isLoading && isDockerStarted !== null),
switchMap(([, isDockerStarted]) => {
this.appsStats.subscribeToUpdates();
this.subscribeToInstalledAppsUpdates();

if (!isDockerStarted) {
return of([]);
}
Expand Down

0 comments on commit 9179593

Please sign in to comment.