fix(queue): wire the Remove all after and Add to playlist row actions
The per-track context menu in the Queue sidebar had two placeholder items with no click handler: "Remove all after" and "Add to playlist". Wire both end to end. - QueueState gains remove-all-after(int) and add-to-playlist(int), resolved from the page-local row index like remove-upcoming (search-filter aware). - Core/player gain remove_upcoming_after(upcoming_index): truncates the upcoming list in PLAY order (shuffle-aware, reuses remove_upcoming_track), clears the stop-after marker if it lands in the removed range, and emits a single QueueUpdated. The pre-existing remove_after (absolute-index, not shuffle-aware) was dead code and stays only for its unit coverage. - Add to playlist reuses the save-as-playlist picker handoff seeded with the single row's track id. cc
This commit is contained in:
6 files changed
+220
-1
No files matched your search
@@ -4418,6 +4418,12 @@ export global QueueState {
|
||||
callback play-history(int);
|
||||
// Remove the upcoming entry at `index` within the current page slice.
|
||||
callback remove-upcoming(int);
|
||||
// Remove every upcoming entry after the page-local `index` (that row is
|
||||
// kept). The Rust controller resolves it to a queue-wide upcoming index.
|
||||
callback remove-all-after(int);
|
||||
// Open the Add-to-Playlist picker seeded with the upcoming row at the
|
||||
// page-local `index`.
|
||||
callback add-to-playlist(int);
|
||||
// Reorder the upcoming list: move the page-local row `from` to the insertion
|
||||
// slot `to` (0 = before the first upcoming row, N = after the last). The Rust
|
||||
// controller resolves the page-local indices to queue-wide upcoming indices
|
||||
|
||||
Reference in new issue
Block a user