mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-26 13:49:21 +08:00
fix bug: playingbar flickers when audio is paused while traversing through playlist
This commit is contained in:
parent
b4ba187be7
commit
a58c70a1ad
7
start.go
7
start.go
@ -470,15 +470,10 @@ func start(application *tview.Application, args Args) {
|
|||||||
|
|
||||||
init := false
|
init := false
|
||||||
gomu.app.SetAfterDrawFunc(func(_ tcell.Screen) {
|
gomu.app.SetAfterDrawFunc(func(_ tcell.Screen) {
|
||||||
if !init {
|
if !init && !gomu.player.IsRunning() {
|
||||||
gomu.playingBar.setDefault()
|
gomu.playingBar.setDefault()
|
||||||
init = true
|
init = true
|
||||||
}
|
}
|
||||||
if gomu.player.IsRunning() {
|
|
||||||
gomu.playingBar.setSongTitle(gomu.player.GetCurrentSong().Name())
|
|
||||||
} else {
|
|
||||||
gomu.playingBar.setDefault()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
go populateAudioLength(gomu.playlist.GetRoot())
|
go populateAudioLength(gomu.playlist.GetRoot())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user