Show message in migrate screen if library is empty
This commit is contained in:
parent
82f14a7d59
commit
690d8e43ae
2 changed files with 14 additions and 0 deletions
|
@ -63,6 +63,13 @@ class MigrationSourcesController :
|
|||
}
|
||||
|
||||
fun setSources(sourcesWithManga: List<SourceItem>) {
|
||||
// Show empty view if needed
|
||||
if (sourcesWithManga.isNotEmpty()) {
|
||||
binding.emptyView.hide()
|
||||
} else {
|
||||
binding.emptyView.show(R.string.information_empty_library)
|
||||
}
|
||||
|
||||
adapter?.updateDataSet(sourcesWithManga)
|
||||
}
|
||||
|
||||
|
|
|
@ -21,4 +21,11 @@
|
|||
app:fastScrollerBubbleEnabled="false"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<eu.kanade.tachiyomi.widget.EmptyView
|
||||
android:id="@+id/empty_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone" />
|
||||
|
||||
</FrameLayout>
|
||||
|
|
Reference in a new issue