diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-18 17:33:57 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-18 17:33:57 +0100 |
commit | 185033c462b92854117bc57258bf33b3579a7ca5 (patch) | |
tree | 172ce596ddbae14950a49bd1893b8cd032e28783 /src/imap/mailbox_view.rs | |
parent | e1161cab0e71ec604e376d2d87f7d1226f3f0244 (diff) | |
download | aerogramme-185033c462b92854117bc57258bf33b3579a7ca5.tar.gz aerogramme-185033c462b92854117bc57258bf33b3579a7ca5.zip |
idling works!!!
Diffstat (limited to 'src/imap/mailbox_view.rs')
-rw-r--r-- | src/imap/mailbox_view.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs index 07fa3ad..85a4961 100644 --- a/src/imap/mailbox_view.rs +++ b/src/imap/mailbox_view.rs @@ -224,6 +224,12 @@ impl MailboxView { Ok((summary, conflict_id_or_uid)) } + pub async fn idle_sync(&mut self) -> Result<Vec<Body<'static>>> { + self.internal.mailbox.notify().await.upgrade().ok_or(anyhow!("test"))?.notified().await; + self.internal.mailbox.opportunistic_sync().await?; + self.update(UpdateParameters::default()).await + } + pub async fn expunge(&mut self) -> Result<Vec<Body<'static>>> { self.internal.sync().await?; let state = self.internal.peek().await; |