add option to show album years in grid views

This commit is contained in:
Drew Weymouth
2024-06-27 17:44:41 -07:00
parent 2b39c6ba66
commit edf85a4162
15 changed files with 179 additions and 43 deletions
+8
View File
@@ -70,6 +70,7 @@ func NewFavoritesPage(cfg *backend.FavoritesPageConfig, pool *util.WidgetPool, c
} else {
a.albumGrid = widgets.NewGridView(iter, a.im, myTheme.AlbumIcon)
}
a.albumGrid.ShowSuffix = cfg.ShowAlbumYears
a.contr.ConnectAlbumGridActions(a.albumGrid)
if cfg.InitialView == "Artists" {
a.toggleBtns.SetActivatedButton(1)
@@ -285,6 +286,13 @@ func (a *FavoritesPage) SelectAll() {
}
}
func (a *FavoritesPage) Refresh() {
if a.albumGrid != nil {
a.albumGrid.ShowSuffix = a.cfg.ShowAlbumYears
}
a.BaseWidget.Refresh()
}
func (a *FavoritesPage) tracklistOrNil() *widgets.Tracklist {
if a.tracklistCtr != nil {
return a.tracklistCtr.Objects[0].(*widgets.Tracklist)