Purge database only once after a forced update
This commit is contained in:
parent
9ddd5bb1a7
commit
93efab2d12
@ -428,6 +428,9 @@ public class UpdateService extends JobIntentService {
|
||||
return;
|
||||
} else if ((manualUpdate || forcedUpdate) && fdroidPrefs.isOnDemandDownloadAllowed()) {
|
||||
Utils.debugLog(TAG, "manually requested or forced update");
|
||||
if (forcedUpdate) {
|
||||
DBHelper.resetTransient(this);
|
||||
}
|
||||
} else if (!fdroidPrefs.isBackgroundDownloadAllowed() && !fdroidPrefs.isOnDemandDownloadAllowed()) {
|
||||
Utils.debugLog(TAG, "don't run update");
|
||||
return;
|
||||
@ -461,10 +464,6 @@ public class UpdateService extends JobIntentService {
|
||||
|
||||
sendStatus(this, STATUS_INFO, getString(R.string.status_connecting_to_repo, repo.address));
|
||||
|
||||
if (forcedUpdate) {
|
||||
DBHelper.resetTransient(this);
|
||||
}
|
||||
|
||||
try {
|
||||
RepoUpdater updater = new IndexV1Updater(this, repo);
|
||||
if (Preferences.get().isForceOldIndexEnabled() || !updater.update()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user