Skip to content

Commit

Permalink
Merge pull request #2345 from rak-phillip/bugfix/2343-delete-duplicat…
Browse files Browse the repository at this point in the history
…e-image-ids

Only delete a unique collection of image ids
  • Loading branch information
mook-as authored Jun 7, 2022
2 parents c0bba1f + 014aade commit 84415ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/imageEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ export class ImageEventHandler {

Electron.ipcMain.on('do-image-deletion-batch', async(event, imageIDs) => {
try {
await this.imageProcessor.deleteImages(imageIDs);
const uniqueImageIDs = new Set<string>(imageIDs);

await this.imageProcessor.deleteImages([...uniqueImageIDs]);
await this.imageProcessor.refreshImages();
event.reply('images-process-ended', 0);
} catch (err) {
Expand Down

0 comments on commit 84415ef

Please sign in to comment.