Delayed Tracking Update related fix (#8642)

* Delayed Tracking Update related fix

* Lint

(cherry picked from commit ba91b483a0)

# Conflicts:
#	app/build.gradle.kts
#	app/src/main/java/eu/kanade/data/track/TrackRepositoryImpl.kt
#	app/src/main/java/eu/kanade/domain/track/interactor/GetTracks.kt
#	app/src/main/java/eu/kanade/domain/track/repository/TrackRepository.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt
#	app/src/main/sqldelight/data/manga_sync.sq
This commit is contained in:
AntsyLich
2022-12-02 10:01:24 +06:00
committed by Jobobby04
parent e7824a6891
commit df4563772e
12 changed files with 98 additions and 66 deletions
+10 -1
View File
@@ -89,7 +89,6 @@ object EXHMigrations {
/**
* 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(
@@ -501,6 +500,16 @@ object EXHMigrations {
libraryPreferences.showContinueReadingButton().set(true)
}
}
if (oldVersion under 44) {
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())
}
}
}
// if (oldVersion under 1) { } (1 is current release version)
// do stuff here when releasing changed crap