[wip] fix auto-download for pre-messages

This commit is contained in:
Hocuri
2025-12-14 21:21:39 +01:00
parent 96fa64d69b
commit 13bbbd8c14
2 changed files with 5 additions and 6 deletions

View File

@@ -2284,6 +2284,7 @@ pub(crate) async fn prefetch_should_download(
message_id: &str,
mut flags: impl Iterator<Item = Flag<'_>>,
) -> Result<bool> {
return Ok(true);
if message::rfc724_mid_exists(context, message_id)
.await?
.is_some()

View File

@@ -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();