diff options
Diffstat (limited to 'src/command/actions.rs')
-rw-r--r-- | src/command/actions.rs | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/src/command/actions.rs b/src/command/actions.rs index a4bdf02c..8cc89aea 100644 --- a/src/command/actions.rs +++ b/src/command/actions.rs @@ -61,6 +61,7 @@ pub enum TabAction { Close, Kill(Uuid), New(Option<Box<dyn Component>>), + ManageMailboxes, } #[derive(Debug)] @@ -120,7 +121,6 @@ pub enum Action { PrintEnv(String), Compose(ComposeAction), Mailbox(AccountName, MailboxOperation), - ManageMailboxes, AccountAction(AccountName, AccountAction), PrintSetting(String), ReloadConfiguration, @@ -130,26 +130,13 @@ pub enum Action { impl Action { pub fn needs_confirmation(&self) -> bool { - match self { - Action::Listing(ListingAction::Delete) => true, - Action::Listing(_) => false, - Action::ViewMailbox(_) => false, - Action::Sort(_, _) => false, - Action::SubSort(_, _) => false, - Action::Tab(_) => false, - Action::MailingListAction(_) => true, - Action::View(_) => false, - Action::SetEnv(_, _) => false, - Action::PrintEnv(_) => false, - Action::Compose(_) => false, - Action::Mailbox(_, _) => true, - Action::AccountAction(_, _) => false, - Action::PrintSetting(_) => false, - Action::ToggleMouse => false, - Action::ManageMailboxes => false, - Action::Quit => true, - Action::ReloadConfiguration => false, - } + matches!( + self, + Action::Listing(ListingAction::Delete) + | Action::MailingListAction(_) + | Action::Mailbox(_, _) + | Action::Quit + ) } } |