fix: no sending while pickingFile

This commit is contained in:
Maas Lalani 2023-06-14 10:27:29 -04:00
parent 2b19a65b4c
commit 5f884c4946
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000

View file

@ -62,6 +62,6 @@ func (k KeyMap) FullHelp() [][]key.Binding {
func (m *Model) updateKeymap() {
m.keymap.Attach.SetEnabled(m.state == editingAttachments)
canSend := m.From.Value() != "" && m.To.Value() != "" && m.Subject.Value() != "" && m.Body.Value() != ""
m.keymap.Send.SetEnabled(canSend && m.state != editingBody)
m.keymap.Send.SetEnabled(canSend && m.state != editingBody && m.state != pickingFile)
m.keymap.Unattach.SetEnabled(m.state == editingAttachments && len(m.Attachments.Items()) > 0)
}