Delayed Tracking Update related fix (#8642)

* Delayed Tracking Update related fix

* Lint
This commit is contained in:
AntsyLich
2022-12-02 10:01:24 +06:00
committed by GitHub
parent 3a8b5e1b5e
commit ba91b483a0
11 changed files with 88 additions and 65 deletions

View File

@@ -36,7 +36,6 @@ object Migrations {
/**
* Performs a migration when the application is updated.
*
* @param preferences Preferences of the application.
* @return true if a migration is performed, false otherwise.
*/
fun upgrade(
@@ -339,6 +338,16 @@ object Migrations {
}
}
}
if (oldVersion < 92) {
val trackingQueuePref = context.getSharedPreferences("tracking_queue", Context.MODE_PRIVATE)
trackingQueuePref.all.forEach {
val (_, lastChapterRead) = it.value.toString().split(":")
trackingQueuePref.edit {
remove(it.key)
putFloat(it.key, lastChapterRead.toFloat())
}
}
}
return true
}