From c97edef403acc92aabe8940675ba9de5152a55a6 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Thu, 11 May 2023 16:54:54 -0700 Subject: [PATCH] let Ctrl+A select all tracks on favorites page w/ track view active --- ui/browsing/favoritespage.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/browsing/favoritespage.go b/ui/browsing/favoritespage.go index ee398b6..3e836b3 100644 --- a/ui/browsing/favoritespage.go +++ b/ui/browsing/favoritespage.go @@ -210,6 +210,14 @@ func (a *FavoritesPage) OnSongChange(song *subsonic.Child, _ *subsonic.Child) { } } +var _ CanSelectAll = (*FavoritesPage)(nil) + +func (a *FavoritesPage) SelectAll() { + if a.toggleBtns.ActivatedButtonIndex() == 2 /*songs*/ && a.tracklistCtr != nil { + a.tracklistCtr.Objects[0].(*widgets.Tracklist).SelectAll() + } +} + func (a *FavoritesPage) doSearchAlbums(query string) { iter := a.lm.SearchIterWithFilter(query, func(al *subsonic.AlbumID3) bool { return al.Starred.After(time.Time{})