ui/compose: small panic fix
if user (Esc)apes from the send dialog the selector widget will not return any valuesmemfd
parent
0739f80f4b
commit
8de5a9412d
|
@ -566,7 +566,7 @@ impl Component for Composer {
|
|||
ViewMode::Send(s) => s,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
let result: bool = s.collect()[0];
|
||||
let result: bool = s.collect().get(0).map(|b| *b).unwrap_or(false);
|
||||
if result {
|
||||
self.update_draft();
|
||||
if send_draft(
|
||||
|
|
Loading…
Reference in New Issue