From b6cf1e2799421c8458425f1ee798113cf3ad726d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=8Carodej?= Date: Tue, 10 May 2022 07:09:28 +0200 Subject: [PATCH] increase folder item count after drag in file --- resources/js/helpers/functionHelpers.js | 2 +- resources/js/store/modules/fileFunctions.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/js/helpers/functionHelpers.js b/resources/js/helpers/functionHelpers.js index 3c960e89..789f24a8 100644 --- a/resources/js/helpers/functionHelpers.js +++ b/resources/js/helpers/functionHelpers.js @@ -169,7 +169,7 @@ const FunctionHelpers = { }) // Start uploading if uploading process isn't running - if (store.getters.filesInQueueTotal == 0) this.$handleUploading(store.getters.fileQueue[0]) + if (store.getters.filesInQueueTotal === 0) this.$handleUploading(store.getters.fileQueue[0]) // Increase total files in upload bar store.commit('INCREASE_FILES_IN_QUEUES_TOTAL', files.length) diff --git a/resources/js/store/modules/fileFunctions.js b/resources/js/store/modules/fileFunctions.js index 849fb017..1ec90bf5 100644 --- a/resources/js/store/modules/fileFunctions.js +++ b/resources/js/store/modules/fileFunctions.js @@ -179,6 +179,8 @@ const actions = { if (response.data.data.id) { commit('PROCESSING_FILE', false) + commit('INCREASE_FOLDER_ITEM', response.data.data.attributes.parent_id) + // Remove first file from file queue commit('SHIFT_FROM_FILE_QUEUE')