diff --git a/src/imap.rs b/src/imap.rs index e7283b8c9..573a11e95 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -2284,6 +2284,7 @@ pub(crate) async fn prefetch_should_download( message_id: &str, mut flags: impl Iterator>, ) -> Result { + return Ok(true); if message::rfc724_mid_exists(context, message_id) .await? .is_some() diff --git a/src/scheduler.rs b/src/scheduler.rs index caf968fb1..78b93385f 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -501,9 +501,6 @@ async fn inbox_fetch_idle(ctx: &Context, imap: &mut Imap, mut session: Session) } } - download_msgs(ctx, &mut session) - .await - .context("Failed to download messages")?; session .fetch_metadata(ctx) .await @@ -587,9 +584,10 @@ async fn fetch_idle( .await .context("delete_expired_imap_messages")?; - //------- - // TODO: verify that this is the correct position for this call - // in order to guard against lost pre-messages: + download_msgs(ctx, &mut session) + .await + .context("Failed to download messages")?; + download_known_post_messages_without_pre_message(ctx, &mut session).await?; } else if folder_config == Config::ConfiguredInboxFolder { session.last_full_folder_scan.lock().await.take();