From eca10a56609e38d8c2fe38ad7c3e9e90e128a54c Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Thu, 7 Jan 2021 15:48:13 +0200 Subject: [PATCH] melib/backends: add mailbox management events to RefreshEventKind Add mailbox management events from RFC 5423 Internet Message Store Events https://tools.ietf.org/html/rfc5423#page-8 --- melib/src/backends.rs | 8 ++++++++ src/conf/accounts.rs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/melib/src/backends.rs b/melib/src/backends.rs index 442e0347a..e26cb8451 100644 --- a/melib/src/backends.rs +++ b/melib/src/backends.rs @@ -246,6 +246,14 @@ pub enum RefreshEventKind { NewFlags(EnvelopeHash, (Flag, Vec)), Rescan, Failure(MeliError), + MailboxCreate(Mailbox), + MailboxDelete(MailboxHash), + MailboxRename { + old_mailbox_hash: MailboxHash, + new_mailbox: Mailbox, + }, + MailboxSubscribe(MailboxHash), + MailboxUnsubscribe(MailboxHash), } #[derive(Debug, Clone)] diff --git a/src/conf/accounts.rs b/src/conf/accounts.rs index a351cc142..77584cd60 100644 --- a/src/conf/accounts.rs +++ b/src/conf/accounts.rs @@ -1011,6 +1011,14 @@ impl Account { Some(crate::types::NotificationType::Error(err.kind)), )); } + RefreshEventKind::MailboxCreate(_new_mailbox) => {} + RefreshEventKind::MailboxDelete(_mailbox_hash) => {} + RefreshEventKind::MailboxRename { + old_mailbox_hash: _, + new_mailbox: _, + } => {} + RefreshEventKind::MailboxSubscribe(_mailbox_hash) => {} + RefreshEventKind::MailboxUnsubscribe(_mailbox_hash) => {} } } None