ensure clicking anywhere outside tracklists can unselect all
This commit is contained in:
@@ -89,6 +89,18 @@ func (t *TracksPage) Route() controller.Route {
|
||||
return controller.TracksRoute()
|
||||
}
|
||||
|
||||
var _ CanSelectAll = (*TracksPage)(nil)
|
||||
|
||||
func (t *TracksPage) SelectAll() {
|
||||
// deliberate no-op since we don't want to give the impression
|
||||
// that you can select all tracks from the server, since only
|
||||
// some of them are actually loaded into the model
|
||||
}
|
||||
|
||||
func (t *TracksPage) UnselectAll() {
|
||||
t.currentTracklist().UnselectAll()
|
||||
}
|
||||
|
||||
func (t *TracksPage) Reload() {
|
||||
t.tracklist.Clear()
|
||||
iter := t.mp.IterateTracks("")
|
||||
@@ -161,6 +173,10 @@ func (t *TracksPage) doSearch(query string) {
|
||||
t.Refresh()
|
||||
}
|
||||
|
||||
func (t *TracksPage) currentTracklist() *widgets.Tracklist {
|
||||
return t.container.Objects[0].(*fyne.Container).Objects[0].(*widgets.Tracklist)
|
||||
}
|
||||
|
||||
func (t *TracksPage) CreateRenderer() fyne.WidgetRenderer {
|
||||
return widget.NewSimpleRenderer(t.container)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user