mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-11 16:38:19 +01:00
fixed issue-#251-&-#265
This commit is contained in:
parent
e83c2da798
commit
cf6ec4e84f
@ -262,7 +262,10 @@ export const renameItem = (newName, itemUid, collectionUid) => (dispatch, getSta
|
|||||||
}
|
}
|
||||||
const { ipcRenderer } = window;
|
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
|
ipcRenderer
|
||||||
.invoke('renderer:delete-item', item.pathname, item.type)
|
.invoke('renderer:delete-item', item.pathname, item.type)
|
||||||
.then(() => resolve())
|
.then(() => {
|
||||||
|
dispatch(_deleteItem({ itemUid, collectionUid }))
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
.catch((error) => reject(error));
|
.catch((error) => reject(error));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user