From 690d8e43ae6e2b92c2c6fa31c9c31bb44a94ecb7 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 25 Sep 2021 14:41:35 -0400 Subject: [PATCH] Show message in migrate screen if library is empty --- .../browse/migration/sources/MigrationSourcesController.kt | 7 +++++++ app/src/main/res/layout/migration_sources_controller.xml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt index d8124724e..803bd8964 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt @@ -63,6 +63,13 @@ class MigrationSourcesController : } fun setSources(sourcesWithManga: List) { + // Show empty view if needed + if (sourcesWithManga.isNotEmpty()) { + binding.emptyView.hide() + } else { + binding.emptyView.show(R.string.information_empty_library) + } + adapter?.updateDataSet(sourcesWithManga) } diff --git a/app/src/main/res/layout/migration_sources_controller.xml b/app/src/main/res/layout/migration_sources_controller.xml index f290522ee..94d3cc4e2 100644 --- a/app/src/main/res/layout/migration_sources_controller.xml +++ b/app/src/main/res/layout/migration_sources_controller.xml @@ -21,4 +21,11 @@ app:fastScrollerBubbleEnabled="false" tools:visibility="visible" /> + +