aboutsummaryrefslogtreecommitdiff
path: root/src/imap/mailbox_view.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/imap/mailbox_view.rs')
-rw-r--r--src/imap/mailbox_view.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs
index e1ea516..58e71a2 100644
--- a/src/imap/mailbox_view.rs
+++ b/src/imap/mailbox_view.rs
@@ -66,12 +66,18 @@ impl MailboxView {
}
/// Looks up state changes in the mailbox and produces a set of IMAP
- /// responses describing the new state.
- pub async fn update(&mut self) -> Result<Vec<Body>> {
+ /// responses describing the changes.
+ pub async fn sync_update(&mut self) -> Result<Vec<Body>> {
self.mailbox.sync().await?;
// TODO THIS IS JUST A TEST REMOVE LATER
self.mailbox.test().await?;
+ self.update().await
+ }
+
+ /// Produces a set of IMAP responses describing the change between
+ /// what the client knows and what is actually in the mailbox.
+ pub async fn update(&mut self) -> Result<Vec<Body>> {
let new_view = MailboxView {
mailbox: self.mailbox.clone(),
known_state: self.mailbox.current_uid_index().await,