ui/compose: small panic fix

if user (Esc)apes from the send dialog the selector widget will not
  return any values
async
Manos Pitsidianakis 2019-12-20 00:39:04 +02:00
parent 0739f80f4b
commit 8de5a9412d
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 1 additions and 1 deletions

View File

@ -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(