diff options
author | ByteHamster <info@bytehamster.com> | 2019-10-20 23:48:23 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-10-20 23:49:18 +0200 |
commit | c7415924e0fefdfb8ed945170ecb46e84bfeb470 (patch) | |
tree | 79095d6785c76592b0eed8c08b68faedf0839a3d /app/src/main | |
parent | fea84424e34b35a60a7cb0ed91d86571ad3b23e7 (diff) | |
download | AntennaPod-c7415924e0fefdfb8ed945170ecb46e84bfeb470.zip |
Do not try to upgrade database when using clean install
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java index 6392d0535..767f71bb6 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java @@ -32,6 +32,9 @@ public class PreferenceUpgrader { } private static void upgrade(int oldVersion) { + if (oldVersion == -1) { + return; + } if (oldVersion < 1070196) { // migrate episode cleanup value (unit changed from days to hours) int oldValueInDays = UserPreferences.getEpisodeCleanupValue(); |