Show message in migrate screen if library is empty
(cherry picked from commit 690d8e43ae6e2b92c2c6fa31c9c31bb44a94ecb7)
This commit is contained in:
parent
e38322c4dc
commit
c06ccf2480
@ -75,6 +75,13 @@ class MigrationSourcesController :
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun setSources(sourcesWithManga: List<SourceItem>) {
|
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)
|
adapter?.updateDataSet(sourcesWithManga)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,4 +21,11 @@
|
|||||||
app:fastScrollerBubbleEnabled="false"
|
app:fastScrollerBubbleEnabled="false"
|
||||||
tools:visibility="visible" />
|
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>
|
</FrameLayout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user