diff --git a/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt b/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt index 22f7a7f90..3b748d77a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt @@ -5,6 +5,7 @@ import eu.kanade.tachiyomi.data.library.LibraryUpdateJob import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.updater.UpdaterJob import eu.kanade.tachiyomi.extension.ExtensionUpdateJob +import eu.kanade.tachiyomi.ui.library.LibrarySort import java.io.File object Migrations { @@ -82,6 +83,12 @@ object Migrations { // New extension update check job ExtensionUpdateJob.setupTask(context) } + if (oldVersion < 44) { + // Reset sorting preference if using removed sort by source + if (preferences.librarySortingMode().get() == LibrarySort.SOURCE) { + preferences.librarySortingMode().set(LibrarySort.ALPHA) + } + } return true } return false diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt index be629c09f..5dfdff91f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibrarySort.kt @@ -8,4 +8,7 @@ object LibrarySort { const val UNREAD = 3 const val TOTAL = 4 const val LATEST_CHAPTER = 6 + + @Deprecated("Removed in favor of searching by source") + const val SOURCE = 5 }