From ab1985b62b56699061f2206b15404f7f881797c5 Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Wed, 3 Jan 2018 17:53:48 +0100 Subject: Fixed quota update on upload and on delete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files/js/files.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'apps/files/js/files.js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 5e34f664a6c..680eb572268 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -29,23 +29,12 @@ state.dir = null; state.call = null; Files.updateMaxUploadFilesize(response); - Files.updateQuota(response); }); }, // update quota - updateStorageQuotas: function(currentDir) { - var state = Files.updateStorageStatistics; - if (state.dir){ - if (state.dir === currentDir) { - return; - } - // cancel previous call, as it was for another dir - state.call.abort(); - } - state.dir = currentDir; - state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php') + '?dir=' + encodeURIComponent(currentDir),function(response) { - state.dir = null; - state.call = null; + updateStorageQuotas: function() { + var state = Files.updateStorageQuotas; + state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) { Files.updateQuota(response); }); }, @@ -70,6 +59,7 @@ else { Files._updateStorageStatisticsDebounced(dir); } + //Files.updateStorageQuotas(); }, updateMaxUploadFilesize:function(response) { -- cgit v1.2.3