From 96c05bf1138ef38a0f983d4a4632611945cfba2d Mon Sep 17 00:00:00 2001 From: Secozzi <49240133+secozzi@users.noreply.github.com> Date: Wed, 17 Sep 2025 16:57:21 +0545 Subject: [PATCH] Fix migration progress not updating and category flag mischeck (#2484) - Fixed an issue where migration progress wasn't updated after a manual source search - Fixed incorrect logic where the category migration flag was ignored due to checking the chapter flag instead (cherry picked from commit 16b5317b90b3064d12aa38f687cc30110fd8cdb3) --- .../java/mihon/domain/migration/usecases/MigrateMangaUseCase.kt | 2 +- .../mihon/feature/migration/list/MigrationListScreenModel.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/mihon/domain/migration/usecases/MigrateMangaUseCase.kt b/app/src/main/java/mihon/domain/migration/usecases/MigrateMangaUseCase.kt index 15612864b..7106af31d 100644 --- a/app/src/main/java/mihon/domain/migration/usecases/MigrateMangaUseCase.kt +++ b/app/src/main/java/mihon/domain/migration/usecases/MigrateMangaUseCase.kt @@ -89,7 +89,7 @@ class MigrateMangaUseCase( } // Update categories - if (MigrationFlag.CHAPTER in flags) { + if (MigrationFlag.CATEGORY in flags) { val categoryIds = getCategories.await(current.id).map { it.id } setMangaCategories.await(target.id, categoryIds) } diff --git a/app/src/main/java/mihon/feature/migration/list/MigrationListScreenModel.kt b/app/src/main/java/mihon/feature/migration/list/MigrationListScreenModel.kt index 12a4162ac..14724ba45 100644 --- a/app/src/main/java/mihon/feature/migration/list/MigrationListScreenModel.kt +++ b/app/src/main/java/mihon/feature/migration/list/MigrationListScreenModel.kt @@ -251,6 +251,7 @@ class MigrationListScreenModel( } catch (_: Exception) { } migratingManga.searchResult.value = result.toSuccessSearchResult() + updateMigrationProgress() } }