Skip to content

Commit

Permalink
Merge pull request #266 from not-known-person/fix-251-265
Browse files Browse the repository at this point in the history
fixed issue-#251-&-#265,
  • Loading branch information
helloanoop authored Oct 1, 2023
2 parents 78e5cd3 + cf6ec4e commit 3d8dee9
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,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);
});
};

Expand Down Expand Up @@ -347,7 +350,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;
Expand Down

0 comments on commit 3d8dee9

Please sign in to comment.