Merge pull request #39 from issadarkthing/bug-fix

Fix playing bar sets to default when paused
This commit is contained in:
Raziman Mahathir 2021-03-11 12:33:29 +08:00 committed by GitHub
commit fc53a63e65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -110,7 +110,6 @@ func (p *PlayingBar) run() error {
}
gomu.app.QueueUpdateDraw(func() {
p.text.Clear()
p.text.SetText(fmt.Sprintf("%s ┃%s┫ %s\n\n%v",
fmtDuration(start),
progressBar,

View File

@ -473,7 +473,7 @@ func start(application *tview.Application, args Args) {
init := false
gomu.app.SetAfterDrawFunc(func(_ tcell.Screen) {
if !init && !gomu.player.IsRunning() {
if !init && len(gomu.queue.items) == 0 {
gomu.playingBar.setDefault()
init = true
}