From a58c70a1ad776493c6a0412499cbe0223c641e1c Mon Sep 17 00:00:00 2001 From: raziman Date: Thu, 4 Mar 2021 11:32:52 +0800 Subject: [PATCH] fix bug: playingbar flickers when audio is paused while traversing through playlist --- start.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/start.go b/start.go index 6f42f25..3ee6509 100644 --- a/start.go +++ b/start.go @@ -470,15 +470,10 @@ func start(application *tview.Application, args Args) { init := false gomu.app.SetAfterDrawFunc(func(_ tcell.Screen) { - if !init { + if !init && !gomu.player.IsRunning() { gomu.playingBar.setDefault() init = true } - if gomu.player.IsRunning() { - gomu.playingBar.setSongTitle(gomu.player.GetCurrentSong().Name()) - } else { - gomu.playingBar.setDefault() - } }) go populateAudioLength(gomu.playlist.GetRoot())