Fix migration not running sometimes

This commit is contained in:
Jobobby04 2021-03-08 16:56:27 -05:00
parent 39f4949189
commit 0fd9b2a8f6

View File

@ -57,6 +57,8 @@ object EXHMigrations {
val oldVersion = preferences.ehLastVersionCode().get() val oldVersion = preferences.ehLastVersionCode().get()
try { try {
if (oldVersion < BuildConfig.VERSION_CODE) { if (oldVersion < BuildConfig.VERSION_CODE) {
preferences.ehLastVersionCode().set(BuildConfig.VERSION_CODE)
// Fresh install // Fresh install
if (oldVersion == 0) { if (oldVersion == 0) {
// Set up default background tasks // Set up default background tasks
@ -215,8 +217,6 @@ object EXHMigrations {
// TODO BE CAREFUL TO NOT FUCK UP MergedSources IF CHANGING URLs // TODO BE CAREFUL TO NOT FUCK UP MergedSources IF CHANGING URLs
preferences.ehLastVersionCode().set(BuildConfig.VERSION_CODE)
return true return true
} }
} catch (e: Exception) { } catch (e: Exception) {