[bugfix]: fix queue offset when removing tracks (#301)

* [bugfix]: fix queue offset when removing tracks

* Fix song index numbers when removing songs

---------

Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
Kendall Garner 2023-10-22 22:21:31 +00:00 committed by GitHub
parent 3a144ab821
commit e6ed9229c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 4 deletions

View file

@ -613,10 +613,12 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
}
}
ctx.tableApi?.redrawRows();
if (isCurrentSongRemoved) {
remote?.updateSong({ song: playerData.current.song });
}
}, [ctx.dataNodes, playerType, removeFromQueue]);
}, [ctx.dataNodes, ctx.tableApi, playerType, removeFromQueue]);
const handleDeselectAll = useCallback(() => {
ctx.tableApi?.deselectAll();