Skip to content

Commit

Permalink
fix(files_trashbin): Only emit files:node:deleted events if deleting …
Browse files Browse the repository at this point in the history
…all trash was successful

Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Jan 8, 2025
1 parent b3a141f commit 5858070
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/files_trashbin/src/fileListActions/emptyTrashAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ export const emptyTrashAction = new FileListAction({

const result = await askConfirmation
if (result === true) {
await emptyTrash()
nodes.forEach((node) => emit('files:node:deleted', node))
if (await emptyTrash()) {
nodes.forEach((node) => emit('files:node:deleted', node))
}
return
}

Expand Down

0 comments on commit 5858070

Please sign in to comment.