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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user