mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
Set changelog version code when restoring zip backup
This commit is contained in:
parent
0e00d74913
commit
69530de0c6
@ -37,6 +37,7 @@ import java.util.Locale;
|
|||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipFile;
|
import java.util.zip.ZipFile;
|
||||||
|
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.BuildConfig;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.database.DBHandler;
|
import nodomain.freeyourgadget.gadgetbridge.database.DBHandler;
|
||||||
@ -154,6 +155,11 @@ public class ZipBackupImportJob extends AbstractZipBackupJob {
|
|||||||
if (!jsonBackupPreferences.importInto(globalPreferences)) {
|
if (!jsonBackupPreferences.importInto(globalPreferences)) {
|
||||||
LOG.warn("Global preferences were not commited");
|
LOG.warn("Global preferences were not commited");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We may be restoring from different versions - reset the changelog version
|
||||||
|
globalPreferences.edit()
|
||||||
|
.putInt("ckChangeLog_last_version_code", BuildConfig.VERSION_CODE)
|
||||||
|
.apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAborted()) return;
|
if (isAborted()) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user