diff options
Diffstat (limited to 'src/page_playlists.go')
-rw-r--r-- | src/page_playlists.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/page_playlists.go b/src/page_playlists.go index 2ec8165..25b35ba 100644 --- a/src/page_playlists.go +++ b/src/page_playlists.go | |||
@@ -15,17 +15,18 @@ func (a *app) playlistsPage() tview.Primitive { | |||
15 | SetHighlightFullLine(true). | 15 | SetHighlightFullLine(true). |
16 | ShowSecondaryText(false) | 16 | ShowSecondaryText(false) |
17 | a.playlistsList.SetBorder(true).SetBorderAttributes(tcell.AttrDim) | 17 | a.playlistsList.SetBorder(true).SetBorderAttributes(tcell.AttrDim) |
18 | a.playlistsList.SetFocusFunc(func() { a.updateFooter() }) | ||
18 | 19 | ||
19 | a.playlistSongs = tview.NewList(). | 20 | a.playlistSongs = tview.NewList(). |
20 | SetHighlightFullLine(true). | 21 | SetHighlightFullLine(true). |
21 | ShowSecondaryText(false) | 22 | ShowSecondaryText(false) |
22 | a.playlistSongs.SetBorder(true).SetBorderAttributes(tcell.AttrDim) | 23 | a.playlistSongs.SetBorder(true).SetBorderAttributes(tcell.AttrDim) |
24 | a.playlistSongs.SetFocusFunc(func() { a.updateFooter() }) | ||
23 | 25 | ||
24 | // Change the left-right keys to switch between the panels | 26 | // Change the left-right keys to switch between the panels |
25 | a.playlistsList.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { | 27 | a.playlistsList.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { |
26 | if event.Key() == tcell.KeyLeft || event.Key() == tcell.KeyRight { | 28 | if event.Key() == tcell.KeyLeft || event.Key() == tcell.KeyRight { |
27 | a.tv.SetFocus(a.playlistSongs) | 29 | a.tv.SetFocus(a.playlistSongs) |
28 | a.updateFooter() | ||
29 | return nil | 30 | return nil |
30 | } | 31 | } |
31 | return event | 32 | return event |
@@ -33,7 +34,6 @@ func (a *app) playlistsPage() tview.Primitive { | |||
33 | a.playlistSongs.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { | 34 | a.playlistSongs.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { |
34 | if event.Key() == tcell.KeyLeft || event.Key() == tcell.KeyRight { | 35 | if event.Key() == tcell.KeyLeft || event.Key() == tcell.KeyRight { |
35 | a.tv.SetFocus(a.playlistsList) | 36 | a.tv.SetFocus(a.playlistsList) |
36 | a.updateFooter() | ||
37 | return nil | 37 | return nil |
38 | } | 38 | } |
39 | return event | 39 | return event |
@@ -62,7 +62,6 @@ func (a *app) refreshPlaylists() error { | |||
62 | a.playlistsList.AddItem(pl.Name, "", 0, func() { | 62 | a.playlistsList.AddItem(pl.Name, "", 0, func() { |
63 | a.loadPlaylist(id) | 63 | a.loadPlaylist(id) |
64 | a.tv.SetFocus(a.playlistSongs) | 64 | a.tv.SetFocus(a.playlistSongs) |
65 | a.updateFooter() | ||
66 | }) | 65 | }) |
67 | } | 66 | } |
68 | 67 | ||