Skip to content

Commit

Permalink
Add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshankman committed Nov 4, 2024
1 parent b94a26f commit ce920c5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ ipcMain.on('delete-song', async (event, arg) => {
};
writeFileSyncToUserConfig(updatedStore);

/**
* @todo this is great but we it causes us to scroll back to the
* top of the library list. We should instead remember the index
* that the user was at before deleting the song and then scroll
* back to that index.
*/
event.reply('update-store', updatedStore);
});

Expand Down Expand Up @@ -373,6 +379,12 @@ ipcMain.on('delete-album', async (event, arg) => {

writeFileSyncToUserConfig(updatedStore);

/**
* @todo this is great but we it causes us to scroll back to the
* top of the library list. We should instead remember the index
* that the user was at before deleting the album and then scroll
* back to that index.
*/
event.reply('update-store', updatedStore);
});

Expand All @@ -382,6 +394,12 @@ ipcMain.on('delete-album', async (event, arg) => {
ipcMain.on('menu-hide-dupes', async (event) => {
const updatedStore = await hideOrDeleteDupes(event, false);
writeFileSyncToUserConfig(updatedStore);
/**
* @todo this is great but we it causes us to scroll back to the
* top of the library list. We should instead remember the index
* that the user was at before deleting the album and then scroll
* back to that index.
*/
event.reply('update-store', updatedStore);
});

Expand All @@ -391,6 +409,12 @@ ipcMain.on('menu-hide-dupes', async (event) => {
ipcMain.on('menu-delete-dupes', async (event) => {
const updatedStore = await hideOrDeleteDupes(event, true);
writeFileSyncToUserConfig(updatedStore);
/**
* @todo this is great but we it causes us to scroll back to the
* top of the library list. We should instead remember the index
* that the user was at before deleting the album and then scroll
* back to that index.
*/
event.reply('update-store', updatedStore);
});

Expand Down

0 comments on commit ce920c5

Please sign in to comment.