From dbb1602a9f9f3b441173a83aa0d5255ec5826fe8 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Mon, 3 Jun 2024 19:27:09 -0700 Subject: [PATCH] make sure to update lyric position when restoring NowPlaying page --- ui/browsing/nowplayingpage.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ui/browsing/nowplayingpage.go b/ui/browsing/nowplayingpage.go index b6c5ea8..6831bfc 100644 --- a/ui/browsing/nowplayingpage.go +++ b/ui/browsing/nowplayingpage.go @@ -421,6 +421,17 @@ func (a *NowPlayingPage) Reload() { a.totalTime += float64(tr.Metadata().Duration) } a.formatStatusLine() + + if a.tabs == nil { + return + } + switch a.tabs.SelectedIndex() { + case 1: /*lyrics*/ + a.lastPlayPos = a.pm.CurrentPlayer().GetStatus().TimePos + a.updateLyrics() + case 2: /*related*/ + a.updateRelatedList() + } } func (s *nowPlayingPageState) Restore() Page {