From 22232c7d6e4ef887e72b860bf2a040781652d6e5 Mon Sep 17 00:00:00 2001 From: iequidoo Date: Mon, 22 Dec 2025 05:28:02 -0300 Subject: [PATCH] fix: inner_configure: Check Config::OnlyFetchMvbox before MvboxMove for multi-transport (#7637) `Config::OnlyFetchMvbox` should be checked before `MvboxMove` because the latter makes no sense in presense of `OnlyFetchMvbox` and even grayed out in the UIs in this case. Otherwise users will see an error mentioning the wrong setting. --- src/configure.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/configure.rs b/src/configure.rs index e72315e7e4..282c931d36 100644 --- a/src/configure.rs +++ b/src/configure.rs @@ -272,14 +272,16 @@ impl Context { ) .await? { - if self.get_config(Config::MvboxMove).await?.as_deref() != Some("0") { + // Should be checked before `MvboxMove` because the latter makes no sense in presense of + // `OnlyFetchMvbox` and even grayed out in the UIs in this case. + if self.get_config(Config::OnlyFetchMvbox).await?.as_deref() != Some("0") { bail!( - "To use additional relays, disable the legacy option \"Settings / Advanced / Move automatically to DeltaChat Folder\"." + "To use additional relays, disable the legacy option \"Settings / Advanced / Only Fetch from DeltaChat Folder\"." ); } - if self.get_config(Config::OnlyFetchMvbox).await?.as_deref() != Some("0") { + if self.get_config(Config::MvboxMove).await?.as_deref() != Some("0") { bail!( - "To use additional relays, disable the legacy option \"Settings / Advanced / Only Fetch from DeltaChat Folder\"." + "To use additional relays, disable the legacy option \"Settings / Advanced / Move automatically to DeltaChat Folder\"." ); } if self.get_config(Config::ShowEmails).await?.as_deref() != Some("2") {