fix: folder showing after deleting

This commit is contained in:
Beedhan 2023-10-01 23:55:39 +05:45
parent e83c2da798
commit ce9cdc5293

View File

@ -339,11 +339,10 @@ export const deleteItem = (itemUid, collectionUid) => (dispatch, getState) => {
if (!collection) {
return reject(new Error('Collection not found'));
}
const item = findItemInCollection(collection, itemUid);
if (item) {
const { ipcRenderer } = window;
dispatch(_deleteItem({ itemUid, collectionUid }));
ipcRenderer
.invoke('renderer:delete-item', item.pathname, item.type)
.then(() => resolve())