diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-18 22:01:02 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-18 22:01:02 +0300 |
commit | 07700ca00f1e5e78ea37173c40122761cdaf6d53 (patch) | |
tree | d1a0e925848ae2a987bbf1748f36ff36e50bb772 /ui/src/execute.rs | |
parent | ba1d0c42e0af56c5a74c3b506f0a952afa974872 (diff) |
ui: Add possible mailing list actions from List-* headers
Diffstat (limited to 'ui/src/execute.rs')
-rw-r--r-- | ui/src/execute.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ui/src/execute.rs b/ui/src/execute.rs index aed01e3a..81822637 100644 --- a/ui/src/execute.rs +++ b/ui/src/execute.rs @@ -27,6 +27,7 @@ use std; pub mod actions; pub use crate::actions::Action::{self, *}; pub use crate::actions::ListingAction::{self, *}; +pub use crate::actions::MailingListAction::{self, *}; pub use crate::actions::TabAction::{self, *}; named!( @@ -95,6 +96,19 @@ named!( map!(ws!(tag!("toggle_thread_snooze")), |_| ToggleThreadSnooze) ); +named!( + mailinglist<Action>, + alt_complete!( + map!(ws!(tag!("list-post")), |_| MailingListAction(ListPost)) + | map!(ws!(tag!("list-unsubscribe")), |_| MailingListAction( + ListUnsubscribe + )) + | map!(ws!(tag!("list-archive")), |_| MailingListAction( + ListArchive + )) + ) +); + named!(pub parse_command<Action>, - alt_complete!( goto | toggle | sort | subsort | close | toggle_thread_snooze) + alt_complete!( goto | toggle | sort | subsort | close | toggle_thread_snooze | mailinglist) ); |