Skip to content
Snippets Groups Projects
Commit da2f48ff authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix: preserve spinner on archive download button until download not started in browser

parent 064f974a
No related branches found
No related tags found
No related merge requests found
......@@ -374,10 +374,6 @@ export class HomeState {
}
downloadFile(ctx: StateContext<HomeStateModel>, resId: string): void {
ctx.patchState({
isLoadingCounterDownloadPreparation: ctx.getState().isLoadingCounterDownloadPreparation - 1,
});
let headers = new HttpHeaders();
headers = headers.set("Content-Disposition", "attachment; filename=" + resId);
......@@ -386,6 +382,9 @@ export class HomeState {
responseType: "blob",
}).subscribe((res: Blob) => {
this.saveFile(res, resId);
ctx.patchState({
isLoadingCounterDownloadPreparation: ctx.getState().isLoadingCounterDownloadPreparation - 1,
});
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment