From 5f7925f350e51366d47bb81673fa276ee5e40faf Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Mon, 6 Jul 2026 15:32:26 +0200 Subject: [PATCH] fix(music): scope current-track highlight per server TrackRow compared bare ids (server-scoped rating keys), so a track on another server with the same id lit up as currently playing. Compare globalKey (serverId:id) like the rest of the queue engine. Co-Authored-By: Claude Fable 5 --- lib/widgets/music/track_row.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/widgets/music/track_row.dart b/lib/widgets/music/track_row.dart index 0daa5cd7..18f06fe1 100644 --- a/lib/widgets/music/track_row.dart +++ b/lib/widgets/music/track_row.dart @@ -195,7 +195,11 @@ class _TrackRowState extends State with ContextMenuTapMixin, final colorScheme = Theme.of(context).colorScheme; // Both selects run unconditionally every build (provider contract). - final isCurrentById = context.select((s) => s.currentTrack?.id == widget.item.id); + // globalKey, not id: a bare ratingKey is server-scoped, so a track on + // another server with the same id would falsely light up as current. + final isCurrentById = context.select( + (s) => s.currentTrack?.globalKey == widget.item.globalKey, + ); final serviceIsPlaying = context.select((s) => s.isPlaying); final isCurrent = widget.isCurrent ?? isCurrentById;