mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 17:59:39 +02:00
assumeSingleDevice() and assumeMultiDevice() check for chatmail
This commit is contained in:
parent
7257a3180d
commit
cd9b03cf5c
2 changed files with 5 additions and 5 deletions
|
@ -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*/);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue