From 65efac0ba55357d4c24c7a50309b13767ef2c8a5 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Fri, 6 Sep 2024 17:46:47 -0700 Subject: [PATCH] move refresh into AppendTracks impl --- ui/widgets/tracklist.go | 3 ++- ui/widgets/tracklistloader.go | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/widgets/tracklist.go b/ui/widgets/tracklist.go index 3ed39aee..b33edd23 100644 --- a/ui/widgets/tracklist.go +++ b/ui/widgets/tracklist.go @@ -345,12 +345,13 @@ func (t *Tracklist) GetTracks() []*mediaprovider.Track { }) } -// Append more tracks to the tracklist. Does not issue Refresh call. Thread-safe. +// Append more tracks to the tracklist. Thread-safe. func (t *Tracklist) AppendTracks(trs []*mediaprovider.Track) { t.tracksMutex.Lock() defer t.tracksMutex.Unlock() t.tracksOrigOrder = append(t.tracks, util.ToTrackListModels(trs)...) t.doSortTracks() + t.list.Refresh() } func (t *Tracklist) SelectAll() { diff --git a/ui/widgets/tracklistloader.go b/ui/widgets/tracklistloader.go index 9f55bbf0..2e95cc9e 100644 --- a/ui/widgets/tracklistloader.go +++ b/ui/widgets/tracklistloader.go @@ -68,7 +68,6 @@ func (t *TracklistLoader) loadMoreTracks(num int) { return } t.tracklist.AppendTracks(t.trackBuffer) - t.tracklist.Refresh() t.len += len(t.trackBuffer) } if t.done {