refactor: Extract tracklist context menu as own component

This commit is contained in:
Drew Weymouth
2025-03-26 08:30:04 -07:00
parent 1a4237e493
commit 5c88180d69
3 changed files with 183 additions and 93 deletions
+3 -2
View File
@@ -52,12 +52,13 @@ func SelectedIndexes(items []*TrackListModel) []int {
return selected
}
func SelectItem(items []*TrackListModel, idx int) {
func SelectItem(items []*TrackListModel, idx int) bool {
if items[idx].Selected {
return
return false
}
UnselectAllItems(items)
items[idx].Selected = true
return true
}
func SelectAllItems(items []*TrackListModel) {