fix(chatview): conditionally focus message input for focus_previous and focus_next keys (#658)
This commit is contained in:
parent
cb7deb4c72
commit
cd592ae8ed
1 changed files with 2 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ func (cv *chatView) focusMessageInput() bool {
|
|||
func (cv *chatView) focusPrevious() {
|
||||
switch cv.app.GetFocus() {
|
||||
case cv.guildsTree:
|
||||
cv.app.SetFocus(cv.messageInput)
|
||||
cv.focusMessageInput()
|
||||
case cv.messagesList: // Handle both a.messagesList and a.flex as well as other edge cases (if there is).
|
||||
if ok := cv.focusGuildsTree(); !ok {
|
||||
cv.app.SetFocus(cv.messageInput)
|
||||
|
|
@ -122,6 +122,7 @@ func (cv *chatView) focusNext() {
|
|||
case cv.guildsTree:
|
||||
cv.app.SetFocus(cv.messagesList)
|
||||
case cv.messagesList:
|
||||
cv.focusMessageInput()
|
||||
cv.app.SetFocus(cv.messageInput)
|
||||
case cv.messageInput: // Handle both a.messageInput and a.flex as well as other edge cases (if there is).
|
||||
if ok := cv.focusGuildsTree(); !ok {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue