Skip to content

Commit 20b3a06

Browse files
committed
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.
1 parent b0127fa commit 20b3a06

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/configure.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,16 @@ impl Context {
272272
)
273273
.await?
274274
{
275-
if self.get_config(Config::MvboxMove).await?.as_deref() != Some("0") {
275+
// Should be checked before `MvboxMove` because the latter makes no sense in presense of
276+
// `OnlyFetchMvbox` and even grayed out in the UIs in this case.
277+
if self.get_config(Config::OnlyFetchMvbox).await?.as_deref() != Some("0") {
276278
bail!(
277-
"To use additional relays, disable the legacy option \"Settings / Advanced / Move automatically to DeltaChat Folder\"."
279+
"To use additional relays, disable the legacy option \"Settings / Advanced / Only Fetch from DeltaChat Folder\"."
278280
);
279281
}
280-
if self.get_config(Config::OnlyFetchMvbox).await?.as_deref() != Some("0") {
282+
if self.get_config(Config::MvboxMove).await?.as_deref() != Some("0") {
281283
bail!(
282-
"To use additional relays, disable the legacy option \"Settings / Advanced / Only Fetch from DeltaChat Folder\"."
284+
"To use additional relays, disable the legacy option \"Settings / Advanced / Move automatically to DeltaChat Folder\"."
283285
);
284286
}
285287
if self.get_config(Config::ShowEmails).await?.as_deref() != Some("2") {

0 commit comments

Comments
 (0)