Fix migration not running sometimes

This commit is contained in:
Jobobby04
2021-03-08 16:56:27 -05:00
parent 39f4949189
commit 0fd9b2a8f6
+2 -2
View File
@@ -57,6 +57,8 @@ object EXHMigrations {
val oldVersion = preferences.ehLastVersionCode().get()
try {
if (oldVersion < BuildConfig.VERSION_CODE) {
preferences.ehLastVersionCode().set(BuildConfig.VERSION_CODE)
// Fresh install
if (oldVersion == 0) {
// Set up default background tasks
@@ -215,8 +217,6 @@ object EXHMigrations {
// TODO BE CAREFUL TO NOT FUCK UP MergedSources IF CHANGING URLs
preferences.ehLastVersionCode().set(BuildConfig.VERSION_CODE)
return true
}
} catch (e: Exception) {