From 6e32ab86c57cba924f94b29e4b489338e8256622 Mon Sep 17 00:00:00 2001 From: Akmal Isomadinov Date: Fri, 9 Aug 2024 19:03:59 +0500 Subject: [PATCH] Web:FilesActionStore Fixed closing the media viewer when deleting the last item --- packages/client/src/store/FilesActionsStore.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/client/src/store/FilesActionsStore.js b/packages/client/src/store/FilesActionsStore.js index 11fc69fd0c..1349a9ec62 100644 --- a/packages/client/src/store/FilesActionsStore.js +++ b/packages/client/src/store/FilesActionsStore.js @@ -155,13 +155,6 @@ class FilesActionStore { this.isBulkDownload = isBulkDownload; }; - isMediaOpen = () => { - const { visible, setMediaViewerData, playlist } = this.mediaViewerDataStore; - if (visible && playlist.length === 1) { - setMediaViewerData({ visible: false, id: null }); - } - }; - updateCurrentFolder = (fileIds, folderIds, clearSelection, operationId) => { const { clearSecondaryProgressData } = this.uploadDataStore.secondaryProgressDataStore; @@ -390,8 +383,6 @@ class FilesActionStore { addActiveItems(null, folderIds, destFolderId); if (folderIds.length || fileIds.length) { - this.isMediaOpen(); - try { this.filesStore.setOperationAction(true); this.setGroupMenuBlocked(true); @@ -852,7 +843,6 @@ class FilesActionStore { if (isFile) { addActiveItems([itemId], null, destFolderId); - this.isMediaOpen(); return deleteFile(itemId) .then(async (res) => { if (res[0]?.error) return Promise.reject(res[0].error);