mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 17:36:30 +03:00
imap: do not synchronize Seen flags on unwatched folders
Synchronizing seen flags doubles the time required to scan all folders. Delta Chat only marks messages as Seen on Inbox or DeltaChat, so there is no need to check for Seen flag on other folders.
This commit is contained in:
@@ -188,6 +188,17 @@ async fn fetch_idle(ctx: &Context, connection: &mut Imap, folder: Config) -> Int
|
||||
return InterruptInfo::new(false);
|
||||
}
|
||||
|
||||
// Synchronize Seen flags.
|
||||
if let Err(err) = connection
|
||||
.sync_seen_flags(ctx, &watch_folder)
|
||||
.await
|
||||
.context("sync_seen_flags")
|
||||
{
|
||||
connection.trigger_reconnect(ctx).await;
|
||||
warn!(ctx, "{:#}", err);
|
||||
return InterruptInfo::new(false);
|
||||
}
|
||||
|
||||
connection.connectivity.set_connected(ctx).await;
|
||||
|
||||
// idle
|
||||
|
||||
Reference in New Issue
Block a user