diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2022-12-30 17:02:10 +0200 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2022-12-30 17:02:10 +0200 |
commit | 660bacb9262dac7457bd8c421cc70343a0db3cd5 (patch) | |
tree | 53fbdd7bc77e2d684dab217b62ecee8d183bc4ee /src/components/mail/listing.rs | |
parent | de2f46fe611726a445c1e06cbc35343e716aa335 (diff) | |
download | meli-660bacb9262dac7457bd8c421cc70343a0db3cd5.zip |
Add `mailto` command to open composer with initial values from mailto templatemaster
Diffstat (limited to 'src/components/mail/listing.rs')
-rw-r--r-- | src/components/mail/listing.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/components/mail/listing.rs b/src/components/mail/listing.rs index 849d2370..5a0e9d06 100644 --- a/src/components/mail/listing.rs +++ b/src/components/mail/listing.rs @@ -1889,6 +1889,15 @@ impl Component for Listing { .push_back(UIEvent::Action(Tab(New(Some(Box::new(mgr)))))); return true; } + UIEvent::Action(Action::Compose(ComposeAction::Mailto(ref mailto))) => { + let account_hash = context.accounts[self.cursor_pos.0].hash(); + let mut composer = Composer::with_account(account_hash, context); + composer.set_draft(mailto.into()); + context + .replies + .push_back(UIEvent::Action(Tab(New(Some(Box::new(composer)))))); + return true; + } UIEvent::StartupCheck(_) | UIEvent::MailboxUpdate(_) | UIEvent::EnvelopeUpdate(_) |