|
|
@@ -119,9 +119,7 @@ func (a *application) onPagesInputCapture(event *tcell.EventKey) *tcell.EventKey
|
|
|
a.SetFocus(a.messagesList)
|
|
|
return nil
|
|
|
case a.cfg.Keys.FocusMessageInput:
|
|
|
- if !a.messageInput.GetDisabled() {
|
|
|
- a.SetFocus(a.messageInput)
|
|
|
- }
|
|
|
+ a.focusMessageInput()
|
|
|
return nil
|
|
|
case a.cfg.Keys.FocusPrevious:
|
|
|
a.focusPrevious()
|
|
|
@@ -169,6 +167,15 @@ func (a *application) focusGuildsTree() bool {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+func (a *application) focusMessageInput() bool {
|
|
|
+ if !a.messageInput.GetDisabled() {
|
|
|
+ a.SetFocus(a.messageInput)
|
|
|
+ return true
|
|
|
+ }
|
|
|
+
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
func (a *application) focusPrevious() {
|
|
|
switch a.GetFocus() {
|
|
|
case a.guildsTree:
|