mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
Merge branch 'faster_fetch'
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
- Further improve finding the correct server after logging in #3208
|
- Further improve finding the correct server after logging in #3208
|
||||||
- `get_connectivity_html()` returns HTML as non-scalable #3213
|
- `get_connectivity_html()` returns HTML as non-scalable #3213
|
||||||
- add update-serial to `DC_EVENT_WEBXDC_STATUS_UPDATE` #3215
|
- add update-serial to `DC_EVENT_WEBXDC_STATUS_UPDATE` #3215
|
||||||
|
- Speed up message receiving via IMAP a bit #3225
|
||||||
|
|
||||||
|
|
||||||
## 1.77.0
|
## 1.77.0
|
||||||
|
|||||||
@@ -168,14 +168,6 @@ async fn fetch_idle(ctx: &Context, connection: &mut Imap, folder: Config) -> Int
|
|||||||
return connection.fake_idle(ctx, Some(watch_folder)).await;
|
return connection.fake_idle(ctx, Some(watch_folder)).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark expired messages for deletion.
|
|
||||||
if let Err(err) = delete_expired_imap_messages(ctx)
|
|
||||||
.await
|
|
||||||
.context("delete_expired_imap_messages failed")
|
|
||||||
{
|
|
||||||
warn!(ctx, "{:#}", err);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch the watched folder.
|
// Fetch the watched folder.
|
||||||
if let Err(err) = connection.fetch_move_delete(ctx, &watch_folder).await {
|
if let Err(err) = connection.fetch_move_delete(ctx, &watch_folder).await {
|
||||||
connection.trigger_reconnect(ctx).await;
|
connection.trigger_reconnect(ctx).await;
|
||||||
@@ -183,6 +175,17 @@ async fn fetch_idle(ctx: &Context, connection: &mut Imap, folder: Config) -> Int
|
|||||||
return InterruptInfo::new(false);
|
return InterruptInfo::new(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mark expired messages for deletion. Marked messages will be deleted from the server
|
||||||
|
// on the next iteration of `fetch_move_delete`. `delete_expired_imap_messages` is not
|
||||||
|
// called right before `fetch_move_delete` because it is not well optimized and would
|
||||||
|
// otherwise slow down message fetching.
|
||||||
|
if let Err(err) = delete_expired_imap_messages(ctx)
|
||||||
|
.await
|
||||||
|
.context("delete_expired_imap_messages failed")
|
||||||
|
{
|
||||||
|
warn!(ctx, "{:#}", err);
|
||||||
|
}
|
||||||
|
|
||||||
// Scan additional folders only after finishing fetching the watched folder.
|
// Scan additional folders only after finishing fetching the watched folder.
|
||||||
//
|
//
|
||||||
// On iOS the application has strictly limited time to work in background, so we may not
|
// On iOS the application has strictly limited time to work in background, so we may not
|
||||||
|
|||||||
Reference in New Issue
Block a user