From 8c960d4739839f06f95db03d6b911104e8e1c62c Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 24 Feb 2022 17:04:34 +0100 Subject: [PATCH] MOBILE-3833 core: Fix download file spinner shown forever --- src/core/services/filepool.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/services/filepool.ts b/src/core/services/filepool.ts index f41ee3cd4..b3db06a44 100644 --- a/src/core/services/filepool.ts +++ b/src/core/services/filepool.ts @@ -2603,12 +2603,12 @@ export class CoreFilepoolProvider { // Success, we add links and remove from queue. CoreUtils.ignoreErrors(this.addFileLinks(siteId, fileId, links)); - this.treatQueueDeferred(siteId, fileId, true); - this.notifyFileDownloaded(siteId, fileId, links); - // Wait for the item to be removed from queue before resolving the promise. // If the item could not be removed from queue we still resolve the promise. await CoreUtils.ignoreErrors(this.removeFromQueue(siteId, fileId)); + + this.treatQueueDeferred(siteId, fileId, true); + this.notifyFileDownloaded(siteId, fileId, links); } catch (errorObject) { // Whoops, we have an error... let dropFromQueue = false;