Fix #477: scroll to currently playing track when loading Now Playing page

This commit is contained in:
Drew Weymouth
2024-09-07 08:17:19 -07:00
parent d19ce0ccad
commit 72de61568a
5 changed files with 21 additions and 17 deletions
+1 -3
View File
@@ -183,9 +183,7 @@ func (p *PlayQueueList) ScrollToNowPlaying() {
idx := slices.IndexFunc(p.items, func(item *util.TrackListModel) bool {
return item.Item.Metadata().ID == p.nowPlayingID
})
if idx > 0 {
p.list.ScrollTo(idx)
}
p.list.ScrollTo(idx)
}
func (p *PlayQueueList) Refresh() {