From f19b44d595abfae1a779df39f71c341d69faa91c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 23 Jun 2022 13:24:58 +0200 Subject: [PATCH] Fix quota text not updated after copying or moving a file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note that the quota may change too when files are moved if the file is moved, for example, to or from a folder shared by other user. Besides the quota the storage statistics are also updated, similar to what is done when a file is deleted. Signed-off-by: Daniel Calviño Sánchez --- apps/files/js/filelist.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index b2dbcf7fd43..8c4335571e7 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2630,7 +2630,10 @@ self.showFileBusyState($tr, false); }); }; - return this.reportOperationProgress(fileNames, moveFileFunction, callback); + return this.reportOperationProgress(fileNames, moveFileFunction, callback).then(function() { + self.updateStorageStatistics(); + self.updateStorageQuotas(); + }); }, _reflect: function (promise){ @@ -2810,7 +2813,10 @@ } }); }; - return this.reportOperationProgress(fileNames, copyFileFunction, callback); + return this.reportOperationProgress(fileNames, copyFileFunction, callback).then(function() { + self.updateStorageStatistics(); + self.updateStorageQuotas(); + }); }, /**