fixed issue-#251-&-#265

This commit is contained in:
not-known-person 2023-10-01 15:22:05 -04:00
parent e83c2da798
commit cf6ec4e84f

View File

@ -262,7 +262,10 @@ export const renameItem = (newName, itemUid, collectionUid) => (dispatch, getSta
}
const { ipcRenderer } = window;
ipcRenderer.invoke('renderer:rename-item', item.pathname, newPathname, newName).then(resolve).catch(reject);
ipcRenderer.invoke('renderer:rename-item', item.pathname, newPathname, newName).then(() => {
dispatch(_renameItem({ newName, itemUid, collectionUid }))
resolve()
}).catch(reject);
});
};
@ -346,7 +349,10 @@ export const deleteItem = (itemUid, collectionUid) => (dispatch, getState) => {
ipcRenderer
.invoke('renderer:delete-item', item.pathname, item.type)
.then(() => resolve())
.then(() => {
dispatch(_deleteItem({ itemUid, collectionUid }))
resolve()
})
.catch((error) => reject(error));
}
return;