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:
@@ -129,6 +129,7 @@ type GridViewItem struct {
|
||||
OnPlay func(shuffle bool)
|
||||
OnAddToQueue func()
|
||||
OnAddToPlaylist func()
|
||||
OnDownload func()
|
||||
OnShowItemPage func()
|
||||
OnShowSecondaryPage func()
|
||||
}
|
||||
@@ -173,7 +174,8 @@ func (g *GridViewItem) showContextMenu(pos fyne.Position) {
|
||||
fyne.NewMenuItem("Play", func() { g.onPlay(false) }),
|
||||
fyne.NewMenuItem("Shuffle", func() { g.onPlay(true) }),
|
||||
fyne.NewMenuItem("Add to queue", g.onAddToQueue),
|
||||
fyne.NewMenuItem("Add to playlist...", g.onAddToPlaylist)),
|
||||
fyne.NewMenuItem("Add to playlist...", g.onAddToPlaylist),
|
||||
fyne.NewMenuItem("Download", g.onDownload)),
|
||||
fyne.CurrentApp().Driver().CanvasForObject(g))
|
||||
}
|
||||
g.menu.ShowAtPosition(pos)
|
||||
@@ -218,3 +220,9 @@ func (g *GridViewItem) onAddToPlaylist() {
|
||||
g.OnAddToPlaylist()
|
||||
}
|
||||
}
|
||||
|
||||
func (g *GridViewItem) onDownload() {
|
||||
if g.OnDownload != nil {
|
||||
g.OnDownload()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user