getting the album name from titleLabel and adding ellipsis after 'Download' option

This commit is contained in:
natilou
2023-06-21 23:35:56 -03:00
parent d59ed11647
commit 6318ce33e4
4 changed files with 6 additions and 11 deletions
+3 -8
View File
@@ -201,14 +201,9 @@ func NewAlbumPageHeader(page *AlbumPage) *AlbumPageHeader {
a.page.contr.DoAddTracksToPlaylistWorkflow(
sharedutil.TracksToIDs(a.page.tracks))
}),
fyne.NewMenuItem("Download", func() {
go func() {
album, err := a.page.mp.GetAlbum(a.albumID)
if err != nil {
log.Print("Error while getting the album: ", album)
}
a.page.contr.ShowDownloadDialog(a.page.tracks, album.Name)
}()
fyne.NewMenuItem("Download...", func() {
a.page.contr.ShowDownloadDialog(a.page.tracks, a.titleLabel.String())
}))
pop = widget.NewPopUpMenu(menu, fyne.CurrentApp().Driver().CanvasForObject(a))
}
+1 -1
View File
@@ -261,7 +261,7 @@ func NewPlaylistPageHeader(page *PlaylistPage) *PlaylistPageHeader {
a.page.contr.DoAddTracksToPlaylistWorkflow(
sharedutil.TracksToIDs(a.page.tracks))
}),
fyne.NewMenuItem("Download", func() {
fyne.NewMenuItem("Download...", func() {
a.page.contr.ShowDownloadDialog(a.page.tracks, a.playlistInfo.Name)
}))
pop = widget.NewPopUpMenu(menu, fyne.CurrentApp().Driver().CanvasForObject(a))