Remove Action::FetchExistingMsgs

This commit is contained in:
link2xt
2022-06-04 00:28:15 +00:00
parent 925b3e254c
commit 303c4f1f6d
7 changed files with 111 additions and 102 deletions

View File

@@ -130,6 +130,19 @@ async fn inbox_loop(ctx: Context, started: Sender<()>, inbox_handlers: ImapConne
}
};
match ctx.get_config_bool(Config::FetchedExistingMsgs).await {
Ok(fetched_existing_msgs) => {
if !fetched_existing_msgs {
if let Err(err) = connection.fetch_existing_msgs(&ctx).await {
warn!(ctx, "Failed to fetch existing messages: {:#}", err);
}
}
}
Err(err) => {
warn!(ctx, "Can't get Config::FetchedExistingMsgs: {:#}", err);
}
}
info = fetch_idle(&ctx, &mut connection, Config::ConfiguredInboxFolder).await;
}
}