refactor and add focus navigation to genres list

This commit is contained in:
Drew Weymouth
2024-02-16 08:33:24 -08:00
parent b97b029422
commit f789296944
7 changed files with 244 additions and 221 deletions
+2 -2
View File
@@ -290,7 +290,7 @@ type PlaylistList struct {
columnsLayout *layouts.ColumnsLayout
header *widgets.ListHeader
list *widgets.DisabledList
list *widgets.FocusList
container *fyne.Container
}
@@ -300,7 +300,7 @@ func NewPlaylistList(initialSort widgets.ListHeaderSort) *PlaylistList {
columnsLayout: layouts.NewColumnsLayout([]float32{-1, -1, 200, 125}),
}
a.buildHeader()
a.list = widgets.NewDisabledList(
a.list = widgets.NewFocusList(
func() int {
return len(a.playlists)
},