mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 10:26:29 +03:00
refactor(imap): move resync request from Context to Imap
For multiple transports we will need to run multiple IMAP clients in parallel. UID validity change detected by one IMAP client should not result in UID resync for another IMAP client.
This commit is contained in:
@@ -206,7 +206,7 @@ impl ImapSession {
|
||||
"The server illegally decreased the uid_next of folder {folder:?} from {old_uid_next} to {new_uid_next} without changing validity ({new_uid_validity}), resyncing UIDs...",
|
||||
);
|
||||
set_uid_next(context, folder, new_uid_next).await?;
|
||||
context.schedule_resync().await?;
|
||||
self.resync_request_sender.try_send(()).ok();
|
||||
}
|
||||
|
||||
// If UIDNEXT changed, there are new emails.
|
||||
@@ -243,7 +243,7 @@ impl ImapSession {
|
||||
.await?;
|
||||
|
||||
if old_uid_validity != 0 || old_uid_next != 0 {
|
||||
context.schedule_resync().await?;
|
||||
self.resync_request_sender.try_send(()).ok();
|
||||
}
|
||||
info!(
|
||||
context,
|
||||
|
||||
Reference in New Issue
Block a user