assumeSingleDevice() and assumeMultiDevice() check for chatmail

This commit is contained in:
B. Petersen 2024-07-06 22:12:25 +02:00 committed by bjoern
parent 7257a3180d
commit cd9b03cf5c
2 changed files with 5 additions and 5 deletions

View file

@ -239,12 +239,14 @@ public class DcContext {
// Called for new profiles on chatmail servers that are "single device" initially; // Called for new profiles on chatmail servers that are "single device" initially;
// to save server disk space, we make use of that delete all messages immediately after download. // to save server disk space, we make use of that delete all messages immediately after download.
public void assumeSingleDevice() { public void assumeSingleDevice() {
if (isChatmail()) {
setConfigInt("delete_server_after", 1 /*at once*/); setConfigInt("delete_server_after", 1 /*at once*/);
} }
}
// Called when we get a hint that another device may be set up. // Called when we get a hint that another device may be set up.
public void assumeMultiDevice() { public void assumeMultiDevice() {
if (getConfigInt("delete_server_after") == 1 /*at once*/) { if (isChatmail() && getConfigInt("delete_server_after") == 1 /*at once*/) {
setConfigInt("delete_server_after", 0 /*never/automatic*/); setConfigInt("delete_server_after", 0 /*never/automatic*/);
} }
} }

View file

@ -373,6 +373,7 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
progressUpdate((int)progress); progressUpdate((int)progress);
} else if (progress==1000/*done*/) { } else if (progress==1000/*done*/) {
DcHelper.getAccounts(this).startIo(); DcHelper.getAccounts(this).startIo();
dcContext.assumeSingleDevice();
progressSuccess(); progressSuccess();
} }
} }
@ -481,9 +482,6 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
return; return;
} }
DcHelper.getAccounts(this).stopIo(); DcHelper.getAccounts(this).stopIo();
if (!isDcLogin) {
dcContext.assumeSingleDevice();
}
dcContext.configure(); dcContext.configure();
}).start(); }).start();
} }