Only allow focus on guilds tree if it exists (#350)
This commit is contained in:
parent
6e683a6526
commit
c07731a98d
1 changed files with 3 additions and 1 deletions
|
|
@ -57,7 +57,9 @@ func (mf *MainFlex) onInputCapture(event *tcell.EventKey) *tcell.EventKey {
|
|||
|
||||
return nil
|
||||
case cfg.Keys.GuildsTree.Focus:
|
||||
app.SetFocus(mf.guildsTree)
|
||||
if mf.GetItemCount() == 2 {
|
||||
app.SetFocus(mf.guildsTree)
|
||||
}
|
||||
return nil
|
||||
case cfg.Keys.MessagesText.Focus:
|
||||
app.SetFocus(mf.messagesText)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue