mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-16 15:49:16 +01:00
Remove redundant job setup calls in migrations
We always set them up earlier in the migrations anyway.
This commit is contained in:
parent
58daedc89e
commit
dd1a19745a
@ -66,10 +66,6 @@ object Migrations {
|
|||||||
|
|
||||||
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
|
|
||||||
if (oldVersion < 14) {
|
|
||||||
// Restore jobs after upgrading to Evernote's job scheduler.
|
|
||||||
LibraryUpdateJob.setupTask(context)
|
|
||||||
}
|
|
||||||
if (oldVersion < 15) {
|
if (oldVersion < 15) {
|
||||||
// Delete internal chapter cache dir.
|
// Delete internal chapter cache dir.
|
||||||
File(context.cacheDir, "chapter_disk_cache").deleteRecursively()
|
File(context.cacheDir, "chapter_disk_cache").deleteRecursively()
|
||||||
@ -96,11 +92,6 @@ object Migrations {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (oldVersion < 43) {
|
|
||||||
// Restore jobs after migrating from Evernote's job scheduler to WorkManager.
|
|
||||||
LibraryUpdateJob.setupTask(context)
|
|
||||||
BackupCreateJob.setupTask(context)
|
|
||||||
}
|
|
||||||
if (oldVersion < 44) {
|
if (oldVersion < 44) {
|
||||||
// Reset sorting preference if using removed sort by source
|
// Reset sorting preference if using removed sort by source
|
||||||
val oldSortingMode = prefs.getInt(libraryPreferences.sortingMode().key(), 0)
|
val oldSortingMode = prefs.getInt(libraryPreferences.sortingMode().key(), 0)
|
||||||
@ -259,9 +250,6 @@ object Migrations {
|
|||||||
basePreferences.extensionInstaller().set(BasePreferences.ExtensionInstaller.LEGACY)
|
basePreferences.extensionInstaller().set(BasePreferences.ExtensionInstaller.LEGACY)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (oldVersion < 76) {
|
|
||||||
BackupCreateJob.setupTask(context)
|
|
||||||
}
|
|
||||||
if (oldVersion < 77) {
|
if (oldVersion < 77) {
|
||||||
val oldReaderTap = prefs.getBoolean("reader_tap", false)
|
val oldReaderTap = prefs.getBoolean("reader_tap", false)
|
||||||
if (!oldReaderTap) {
|
if (!oldReaderTap) {
|
||||||
@ -374,9 +362,6 @@ object Migrations {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (oldVersion < 100) {
|
|
||||||
BackupCreateJob.setupTask(context)
|
|
||||||
}
|
|
||||||
if (oldVersion < 105) {
|
if (oldVersion < 105) {
|
||||||
val pref = libraryPreferences.autoUpdateDeviceRestrictions()
|
val pref = libraryPreferences.autoUpdateDeviceRestrictions()
|
||||||
if (pref.isSet() && "battery_not_low" in pref.get()) {
|
if (pref.isSet() && "battery_not_low" in pref.get()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user