Show empty screen when a category is empty (#8690)

* Show empty screen when a category is empty

* Review changes

* Review changes #2

Co-authored-by: arkon <arkon@users.noreply.github.com>
This commit is contained in:
zbue
2022-12-08 22:15:10 +08:00
committed by GitHub
parent ed5e013874
commit 01c6e46a71
8 changed files with 60 additions and 11 deletions

View File

@@ -58,8 +58,13 @@ fun HistoryScreen(
if (it == null) {
LoadingScreen(modifier = Modifier.padding(contentPadding))
} else if (it.isEmpty()) {
val msg = if (!state.searchQuery.isNullOrEmpty()) {
R.string.no_results_found
} else {
R.string.information_no_recent_manga
}
EmptyScreen(
textResource = R.string.information_no_recent_manga,
textResource = msg,
modifier = Modifier.padding(contentPadding),
)
} else {