mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
don't change delete_server_after, let core handle it
This commit is contained in:
@@ -254,21 +254,6 @@ public class DcContext {
|
||||
setConfigInt("is_muted", muted? 1 : 0);
|
||||
}
|
||||
|
||||
// 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() {
|
||||
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 (isChatmail() && getConfigInt("delete_server_after") == 1 /*at once*/) {
|
||||
setConfigInt("delete_server_after", 0 /*never/automatic*/);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isGmailOauth2Addr(String addr) {
|
||||
final String oauth2url = getOauth2Url(addr, "chat.delta:/foo");
|
||||
return isGmailOauth2Url(oauth2url);
|
||||
|
||||
@@ -391,7 +391,6 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
|
||||
progressUpdate((int)progress);
|
||||
} else if (progress==1000/*done*/) {
|
||||
DcHelper.getAccounts(this).startIo();
|
||||
dcContext.assumeSingleDevice();
|
||||
progressSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,7 +327,6 @@ public class WelcomeActivity extends BaseActionBarActivity implements DcEventCen
|
||||
else if (progress==1000/*done*/) {
|
||||
DcHelper.getAccounts(this).startIo();
|
||||
progressSuccess();
|
||||
dcContext.assumeMultiDevice();
|
||||
notificationController.close();
|
||||
cleanupTempBackupFile();
|
||||
}
|
||||
|
||||
-1
@@ -138,7 +138,6 @@ public abstract class ListSummaryPreferenceFragment extends CorrectedPreferenceF
|
||||
protected void startImexInner(int accountId, int what, String imexPath, String pathAsDisplayedToUser)
|
||||
{
|
||||
DcContext dcContext = DcHelper.getAccounts(getActivity()).getAccount(accountId);
|
||||
dcContext.assumeMultiDevice();
|
||||
this.pathAsDisplayedToUser = pathAsDisplayedToUser;
|
||||
progressWhat = what;
|
||||
dcContext.imex(progressWhat, imexPath);
|
||||
|
||||
@@ -64,7 +64,6 @@ public class BackupProviderFragment extends Fragment implements DcEventCenter.Dc
|
||||
progressBar.setIndeterminate(true);
|
||||
|
||||
dcContext = DcHelper.getContext(getActivity());
|
||||
dcContext.assumeMultiDevice();
|
||||
DcHelper.getEventCenter(getActivity()).addObserver(DcContext.DC_EVENT_IMEX_PROGRESS, this);
|
||||
|
||||
prepareThread = new Thread(() -> {
|
||||
|
||||
@@ -89,7 +89,6 @@ public class BackupReceiverFragment extends Fragment implements DcEventCenter.Dc
|
||||
} else if (permille == 1000) {
|
||||
getTransferActivity().setTransferState(BackupTransferActivity.TransferState.TRANSFER_SUCCESS);
|
||||
getTransferActivity().doFinish();
|
||||
dcContext.assumeMultiDevice();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user