make shuffle and favorite button callbacks non-blocking

This commit is contained in:
Drew Weymouth
2023-02-16 18:02:34 -08:00
parent 941012b7d2
commit 28236ee08c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -182,10 +182,10 @@ func NewAlbumPageHeader(page *AlbumPage) *AlbumPageHeader {
page.onPlayTrackAt(0)
})
shuffleBtn := widget.NewButtonWithIcon(" Shuffle", res.ResShuffleInvertSvg, func() {
page.pm.LoadAlbum(page.albumID, false, true)
page.pm.LoadTracks(page.tracklist.Tracks, false, true)
page.pm.PlayFromBeginning()
})
a.toggleFavButton = widgets.NewFavoriteButton(a.toggleFavorited)
a.toggleFavButton = widgets.NewFavoriteButton(func() { go a.toggleFavorited() })
// Todo: there's got to be a way to make this less convoluted. Custom layout?
a.container = container.NewBorder(nil, nil, a.cover, nil,