fix bug: playingbar flickers when audio is paused while traversing through playlist

This commit is contained in:
raziman 2021-03-04 11:32:52 +08:00
parent b4ba187be7
commit a58c70a1ad

View File

@ -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())