diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt
index 912fbecbd2..2b27305e49 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt
@@ -163,9 +163,12 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
val localManga = smartSearchEngine.networkToLocalManga(searchResult, source.id)
val chapters = source.fetchChapterList(localManga).toSingle().await(
Schedulers.io())
- withContext(Dispatchers.IO) {
+ try {
syncChaptersWithSource(db, chapters, localManga, source)
}
+ catch (e: Exception) {
+ return@async null
+ }
manga.progress.send(validSources.size to processedSources.incrementAndGet())
localManga to chapters.size
} else {
@@ -260,8 +263,10 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
}
override fun noMigration() {
- activity?.toast(R.string.no_migrations)
- router.popCurrentController()
+ launchUI {
+ activity?.toast(R.string.no_migrations)
+ router.popCurrentController()
+ }
}
override fun onMenuItemClick(position: Int, item: MenuItem) {
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessAdapter.kt
index c4b4c4e14c..822a747520 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessAdapter.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationProcessAdapter.kt
@@ -41,7 +41,7 @@ class MigrationProcessAdapter(
}
fun sourceFinished() {
- if (mangasSkipped() == itemCount || itemCount == 0) menuItemListener.noMigration()
+ if (itemCount == 0) menuItemListener.noMigration()
if (allMangasDone()) menuItemListener.enableButtons()
}
diff --git a/app/src/main/res/layout/catalogue_global_search_controller_card.xml b/app/src/main/res/layout/catalogue_global_search_controller_card.xml
index 3f36ba2b3b..610b66d490 100644
--- a/app/src/main/res/layout/catalogue_global_search_controller_card.xml
+++ b/app/src/main/res/layout/catalogue_global_search_controller_card.xml
@@ -9,11 +9,11 @@
@@ -22,11 +22,11 @@
android:id="@+id/source_card"
style="@style/Theme.Widget.CardView.Item"
android:layout_width="0dp"
- android:layout_height="0dp"
+ android:layout_height="wrap_content"
android:minHeight="144dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHeight_default="wrap"
+ app:layout_constrainedHeight="true"
app:layout_constraintStart_toStartOf="parent">