ensure clicking anywhere outside tracklists can unselect all

This commit is contained in:
Drew Weymouth
2024-12-15 15:52:21 -08:00
parent 46153f5fe3
commit 1d342bf413
9 changed files with 113 additions and 48 deletions
+6 -6
View File
@@ -174,12 +174,6 @@ func (a *FavoritesPage) Route() controller.Route {
return controller.FavoritesRoute()
}
func (a *FavoritesPage) Tapped(*fyne.PointEvent) {
if tr := a.tracklistOrNil(); tr != nil {
tr.UnselectAll()
}
}
func (a *FavoritesPage) Reload() {
// reload favorite albums view
if a.searchText != "" {
@@ -287,6 +281,12 @@ func (a *FavoritesPage) SelectAll() {
}
}
func (a *FavoritesPage) UnselectAll() {
if a.toggleBtns.ActivatedButtonIndex() == 2 /*songs*/ && a.tracklistCtr != nil {
a.tracklistOrNil().UnselectAll() // can't be nil in this case
}
}
func (a *FavoritesPage) Refresh() {
if a.albumGrid != nil {
a.albumGrid.ShowSuffix = a.cfg.ShowAlbumYears