feat(player): docked queue overlay with reorder, remove, jump, and clear-upcoming

Add a Queue toggle to the docked player bar opening a centered editable queue
overlay. New additive QueueService.ClearUpcoming keeps the playing track while
dropping the rest. Current track is non-removable.
This commit is contained in:
daniel-c-harvey
2026-06-19 15:18:25 -04:00
parent 4317a2f9e7
commit fe3819f378
10 changed files with 413 additions and 5 deletions
@@ -201,6 +201,20 @@ public sealed class QueueService : IQueueService, IDisposable
QueueChanged?.Invoke();
}
public void ClearUpcoming()
{
// Keep the currently-playing track, drop everything else. No current track (dormant/empty) or a
// queue that already holds only the current → nothing to clear.
var current = Current;
if (current is null || _items.Count <= 1) return;
_items.Clear();
_items.Add(current);
CurrentIndex = 0;
// Playback is untouched (C2): the current track keeps streaming; we only discarded the up-next.
QueueChanged?.Invoke();
}
// Advance on organic end-of-stream only. TrackEnded is not raised by stop/unload/track-switch,
// so a manual stop or a fresh single-track selection elsewhere never spuriously advances the
// queue. When the queue is past its last track, end-of-stream simply stops — nothing to advance.