mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-28 13:48:53 +08:00
fix deleting unhiglighted song in queue
This commit is contained in:
parent
0dd9d3ced4
commit
2496631e33
7
queue.go
7
queue.go
@ -36,8 +36,11 @@ func Queue(player *Player) *tview.List {
|
|||||||
prev()
|
prev()
|
||||||
case 'd':
|
case 'd':
|
||||||
index := list.GetCurrentItem()
|
index := list.GetCurrentItem()
|
||||||
player.Remove(index)
|
|
||||||
list.RemoveItem(index)
|
if index != -1 {
|
||||||
|
player.Remove(index)
|
||||||
|
list.RemoveItem(index)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
start.go
2
start.go
@ -21,7 +21,7 @@ func start(app *tview.Application) {
|
|||||||
|
|
||||||
player := &Player{}
|
player := &Player{}
|
||||||
|
|
||||||
child3 := PlayingBar(app)
|
child3 := PlayingBar(app, player)
|
||||||
child2 := Queue(player)
|
child2 := Queue(player)
|
||||||
child1 := Playlist(child2, child3, player)
|
child1 := Playlist(child2, child3, player)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user