Fix category drag-and-drop migrations

This commit is contained in:
Jobobby04 2022-07-31 10:33:04 -04:00
parent ea7cd18302
commit acdfa3689e
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ android {
applicationId = "eu.kanade.tachiyomi.sy"
minSdk = AndroidConfig.minSdk
targetSdk = AndroidConfig.targetSdk
versionCode = 36
versionCode = 37
versionName = "1.8.4"
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")

View File

@ -412,7 +412,7 @@ object EXHMigrations {
preferences.navigationModeWebtoon().set(5)
}
}
if (oldVersion under 36) {
if (oldVersion under 37) {
// Handle renamed enum values
@Suppress("DEPRECATION")
val newSortingMode = when (val oldSortingMode = preferences.librarySortingMode().get()) {
@ -426,7 +426,7 @@ object EXHMigrations {
runBlocking {
handler.await(true) {
categoriesQueries.getCategories(categoryMapper).executeAsList()
.filter { SortModeSetting.fromFlag(it.flags) == SortModeSetting.DRAG_AND_DROP }
.filter { SortModeSetting.fromFlag(it.flags and SortModeSetting.MASK) == SortModeSetting.DRAG_AND_DROP }
.forEach {
categoriesQueries.update(
categoryId = it.id,