Ability to download from grid

- Adding the option to download the album or tracks in grid view from Artist and Album pages.
This commit is contained in:
natilou
2023-06-20 12:35:59 -03:00
parent 7f907267fa
commit 0dfbe685e1
3 changed files with 27 additions and 1 deletions
+6
View File
@@ -89,6 +89,7 @@ type GridViewState struct {
OnPlay func(id string, shuffle bool)
OnAddToQueue func(id string)
OnAddToPlaylist func(id string)
OnDownload func(id string)
OnShowItemPage func(id string)
OnShowSecondaryPage func(id string)
@@ -217,6 +218,11 @@ func (g *GridView) createGridWrap() {
g.OnAddToPlaylist(card.ItemID())
}
}
card.OnDownload = func() {
if g.OnDownload != nil {
g.OnDownload(card.itemID)
}
}
return card
},
// update func