feat: focus MessagesText widget on cancel

This commit is contained in:
ayn2op 2023-01-21 16:43:09 +05:30
parent 794081d816
commit e494d7811d

View file

@ -49,6 +49,7 @@ func newAttachmentImage(a discord.Attachment) (*AttachmentImage, error) {
func (ai *AttachmentImage) onInputCapture(event *tcell.EventKey) *tcell.EventKey {
if event.Name() == cfg.Keys.Cancel {
app.SetRoot(mainFlex, true)
app.SetFocus(messagesText)
return nil
}