mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-26 13:49:21 +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()
|
||||
case 'd':
|
||||
index := list.GetCurrentItem()
|
||||
player.Remove(index)
|
||||
list.RemoveItem(index)
|
||||
|
||||
if index != -1 {
|
||||
player.Remove(index)
|
||||
list.RemoveItem(index)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user