allow Ctrl+F to focus the search bar on artists, genres, playlists pages
This commit is contained in:
@@ -106,6 +106,12 @@ func (a *ArtistsGenresPage) onSearched(query string) {
|
|||||||
a.list.Refresh()
|
a.list.Refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ Searchable = (*ArtistsGenresPage)(nil)
|
||||||
|
|
||||||
|
func (a *ArtistsGenresPage) SearchWidget() fyne.Focusable {
|
||||||
|
return a.searcher.Entry
|
||||||
|
}
|
||||||
|
|
||||||
func (a *ArtistsGenresPage) Route() controller.Route {
|
func (a *ArtistsGenresPage) Route() controller.Route {
|
||||||
if a.isGenresPage {
|
if a.isGenresPage {
|
||||||
return controller.GenresRoute()
|
return controller.GenresRoute()
|
||||||
|
|||||||
@@ -86,6 +86,12 @@ func (a *PlaylistsPage) onSearched(query string) {
|
|||||||
a.list.Refresh()
|
a.list.Refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ Searchable = (*PlaylistsPage)(nil)
|
||||||
|
|
||||||
|
func (a *PlaylistsPage) SearchWidget() fyne.Focusable {
|
||||||
|
return a.searcher.Entry
|
||||||
|
}
|
||||||
|
|
||||||
func (a *PlaylistsPage) Route() controller.Route {
|
func (a *PlaylistsPage) Route() controller.Route {
|
||||||
return controller.PlaylistsRoute()
|
return controller.PlaylistsRoute()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user