Fix migration not running sometimes
This commit is contained in:
parent
39f4949189
commit
0fd9b2a8f6
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user