melib/imap/untagged: lower mbox count on EXPUNGE events
parent
6f31388b27
commit
535d04f4f0
|
@ -107,6 +107,8 @@ impl ImapConnection {
|
||||||
Some(v) => v,
|
Some(v) => v,
|
||||||
None => return Ok(true),
|
None => return Ok(true),
|
||||||
};
|
};
|
||||||
|
mailbox.exists.lock().unwrap().remove(deleted_hash);
|
||||||
|
mailbox.unseen.lock().unwrap().remove(deleted_hash);
|
||||||
self.uid_store
|
self.uid_store
|
||||||
.hash_index
|
.hash_index
|
||||||
.lock()
|
.lock()
|
||||||
|
@ -388,19 +390,22 @@ impl ImapConnection {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
debug!("fetch uid {} {:?}", uid, flags);
|
debug!("fetch uid {} {:?}", uid, flags);
|
||||||
let env_hash = self
|
if let Some(env_hash) = {
|
||||||
.uid_store
|
let temp = self
|
||||||
.uid_index
|
.uid_store
|
||||||
.lock()
|
.uid_index
|
||||||
.unwrap()
|
.lock()
|
||||||
.get(&(mailbox_hash, uid))
|
.unwrap()
|
||||||
.copied();
|
.get(&(mailbox_hash, uid))
|
||||||
if let Some(env_hash) = env_hash {
|
.copied();
|
||||||
|
temp
|
||||||
|
} {
|
||||||
if !flags.0.intersects(crate::email::Flag::SEEN) {
|
if !flags.0.intersects(crate::email::Flag::SEEN) {
|
||||||
mailbox.unseen.lock().unwrap().insert_new(env_hash);
|
mailbox.unseen.lock().unwrap().insert_new(env_hash);
|
||||||
} else {
|
} else {
|
||||||
mailbox.unseen.lock().unwrap().remove(env_hash);
|
mailbox.unseen.lock().unwrap().remove(env_hash);
|
||||||
}
|
}
|
||||||
|
mailbox.exists.lock().unwrap().insert_new(env_hash);
|
||||||
if let Some(modseq) = modseq {
|
if let Some(modseq) = modseq {
|
||||||
self.uid_store
|
self.uid_store
|
||||||
.modseq
|
.modseq
|
||||||
|
|
Loading…
Reference in New Issue