mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
assumeSingleDevice() and assumeMultiDevice() check for chatmail
This commit is contained in:
@@ -239,12 +239,14 @@ public class DcContext {
|
||||
// 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.
|
||||
public void assumeSingleDevice() {
|
||||
setConfigInt("delete_server_after", 1 /*at once*/);
|
||||
if (isChatmail()) {
|
||||
setConfigInt("delete_server_after", 1 /*at once*/);
|
||||
}
|
||||
}
|
||||
|
||||
// Called when we get a hint that another device may be set up.
|
||||
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*/);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,6 +373,7 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
|
||||
progressUpdate((int)progress);
|
||||
} else if (progress==1000/*done*/) {
|
||||
DcHelper.getAccounts(this).startIo();
|
||||
dcContext.assumeSingleDevice();
|
||||
progressSuccess();
|
||||
}
|
||||
}
|
||||
@@ -481,9 +482,6 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
|
||||
return;
|
||||
}
|
||||
DcHelper.getAccounts(this).stopIo();
|
||||
if (!isDcLogin) {
|
||||
dcContext.assumeSingleDevice();
|
||||
}
|
||||
dcContext.configure();
|
||||
}).start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user