fix: Retry configuring mvbox on IMAP reconnect if mvbox_move is enabled explicitly

If `mvbox_move` isn't enabled explictly, but only by default, better not to retry configuring it to
avoid excessive work, but if it's enabled explicitly by the user and actually can't be configured,
the user should disable it. But anyway not being able to configure the mvbox doesn't prevent Delta
Chat from working just leaving all mail in Inbox.
This commit is contained in:
iequidoo
2024-08-06 12:17:07 -03:00
parent 3e8987b460
commit a5d0d4c126

View File

@@ -1776,14 +1776,17 @@ impl Imap {
context
.set_config_internal(Config::ConfiguredInboxFolder, Some("INBOX"))
.await?;
for (config, name) in folder_configs {
context.set_config_internal(config, Some(&name)).await?;
}
if let Some(mvbox_folder) = mvbox_folder {
info!(context, "Setting MVBOX FOLDER TO {}", &mvbox_folder);
context
.set_config_internal(Config::ConfiguredMvboxFolder, Some(mvbox_folder))
.await?;
}
for (config, name) in folder_configs {
context.set_config_internal(config, Some(&name)).await?;
} else if create_mvbox && context.config_exists(Config::MvboxMove).await? {
warn!(context, "Will retry configuring MVBOX on reconnect.");
return Ok(());
}
context
.sql