mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-07 16:44:27 +01:00
Merge pull request #266 from not-known-person/fix-251-265
fixed issue-#251-&-#265,
This commit is contained in:
commit
3d8dee944f
@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user