aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Garrelou <simon.garrelou@gmail.com>2022-12-12 20:38:22 +0100
committerSimon Garrelou <simon.garrelou@gmail.com>2022-12-12 20:38:22 +0100
commit36a1f025e58489310c414282b2a0ffc14afc9a99 (patch)
tree85bbb309e76770b5fcedef05070377ddf573694f
parent3b4e91f39cd48b12ec6926a264b7a7d5de5a4bb8 (diff)
downloadtermsonic-36a1f025e58489310c414282b2a0ffc14afc9a99.tar.gz
termsonic-36a1f025e58489310c414282b2a0ffc14afc9a99.zip
Change refresh to Ctrl+R
-rw-r--r--src/footer.go2
-rw-r--r--src/page_config.go6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/footer.go b/src/footer.go
index 77c732a..52cfb28 100644
--- a/src/footer.go
+++ b/src/footer.go
@@ -17,6 +17,6 @@ func (a *app) updateFooter() {
17 a.footer.SetText("[blue]l:[yellow] Next song [blue]p:[yellow] Toggle pause [blue]e:[yellow] Play song last [blue]n:[yellow] Play song next") 17 a.footer.SetText("[blue]l:[yellow] Next song [blue]p:[yellow] Toggle pause [blue]e:[yellow] Play song last [blue]n:[yellow] Play song next")
18 } 18 }
19 case "config": 19 case "config":
20 a.footer.SetText("[blue]R:[yellow] Refresh") 20 a.footer.SetText("[blue]Ctrl+R:[yellow] Refresh")
21 } 21 }
22} 22}
diff --git a/src/page_config.go b/src/page_config.go
index 2f8a27b..ed64f58 100644
--- a/src/page_config.go
+++ b/src/page_config.go
@@ -39,7 +39,7 @@ func (a *app) configPage() *tview.Form {
39 }) 39 })
40 40
41 form.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { 41 form.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
42 if event.Rune() == 'R' { 42 if event.Key() == tcell.KeyCtrlR {
43 if err := a.refreshArtists(); err != nil { 43 if err := a.refreshArtists(); err != nil {
44 a.alert("Error: %v", err) 44 a.alert("Error: %v", err)
45 return nil 45 return nil
@@ -51,9 +51,11 @@ func (a *app) configPage() *tview.Form {
51 } 51 }
52 52
53 a.alert("Refreshed successfully") 53 a.alert("Refreshed successfully")
54
55 return nil
54 } 56 }
55 57
56 return nil 58 return event
57 }) 59 })
58 60
59 return form 61 return form