aboutsummaryrefslogtreecommitdiff
path: root/src/imap/flow.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-18 17:33:57 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-18 17:33:57 +0100
commit185033c462b92854117bc57258bf33b3579a7ca5 (patch)
tree172ce596ddbae14950a49bd1893b8cd032e28783 /src/imap/flow.rs
parente1161cab0e71ec604e376d2d87f7d1226f3f0244 (diff)
downloadaerogramme-185033c462b92854117bc57258bf33b3579a7ca5.tar.gz
aerogramme-185033c462b92854117bc57258bf33b3579a7ca5.zip
idling works!!!
Diffstat (limited to 'src/imap/flow.rs')
-rw-r--r--src/imap/flow.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/imap/flow.rs b/src/imap/flow.rs
index 37f225b..72d9e8e 100644
--- a/src/imap/flow.rs
+++ b/src/imap/flow.rs
@@ -3,6 +3,7 @@ use std::fmt;
use std::sync::Arc;
use tokio::sync::Notify;
+use imap_codec::imap_types::core::Tag;
use crate::imap::mailbox_view::MailboxView;
use crate::mail::user::User;
@@ -21,7 +22,7 @@ pub enum State {
NotAuthenticated,
Authenticated(Arc<User>),
Selected(Arc<User>, MailboxView, MailboxPerm),
- Idle(Arc<User>, MailboxView, MailboxPerm, Arc<Notify>),
+ Idle(Arc<User>, MailboxView, MailboxPerm, Tag<'static>, Arc<Notify>),
Logout,
}
@@ -35,7 +36,7 @@ pub enum Transition {
None,
Authenticate(Arc<User>),
Select(MailboxView, MailboxPerm),
- Idle(Notify),
+ Idle(Tag<'static>, Notify),
UnIdle,
Unselect,
Logout,
@@ -55,10 +56,10 @@ impl State {
(State::Selected(u, _, _) , Transition::Unselect) => {
State::Authenticated(u.clone())
}
- (State::Selected(u, m, p), Transition::Idle(s)) => {
- State::Idle(u, m, p, Arc::new(s))
+ (State::Selected(u, m, p), Transition::Idle(t, s)) => {
+ State::Idle(u, m, p, t, Arc::new(s))
},
- (State::Idle(u, m, p, _), Transition::UnIdle) => {
+ (State::Idle(u, m, p, _, _), Transition::UnIdle) => {
State::Selected(u, m, p)
},
(_, Transition::Logout) => State::Logout,