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
@@ -110,12 +110,6 @@ func newArtistPage(artistID string, cfg *backend.ArtistPageConfig, pool *util.Wi
return a
}
func (a *ArtistPage) Tapped(*fyne.PointEvent) {
if a.tracklistCtr != nil {
a.tracklistCtr.Objects[0].(*widgets.Tracklist).UnselectAll()
}
}
var _ CanSelectAll = (*ArtistPage)(nil)
func (a *ArtistPage) SelectAll() {
@@ -124,6 +118,12 @@ func (a *ArtistPage) SelectAll() {
}
}
func (a *ArtistPage) UnselectAll() {
if a.tracklistCtr != nil {
a.tracklistCtr.Objects[0].(*widgets.Tracklist).UnselectAll()
}
}
func (a *ArtistPage) Route() controller.Route {
return controller.ArtistRoute(a.artistID)
}