Merge branch 'feature/empty_states' into devel

This commit is contained in:
Koitharu
2022-07-02 14:48:31 +03:00
16 changed files with 372 additions and 16 deletions

View File

@@ -47,7 +47,7 @@ class FavouritesListViewModel(
when {
list.isEmpty() -> listOf(
EmptyState(
icon = R.drawable.ic_heart_outline,
icon = R.drawable.ic_empty_favourites,
textPrimary = R.string.text_empty_holder_primary,
textSecondary = if (categoryId == NO_ID) {
R.string.you_have_not_favourites_yet

View File

@@ -48,7 +48,7 @@ class HistoryListViewModel(
when {
list.isEmpty() -> listOf(
EmptyState(
icon = R.drawable.ic_history,
icon = R.drawable.ic_empty_history,
textPrimary = R.string.text_history_holder_primary,
textSecondary = R.string.text_history_holder_secondary,
actionStringRes = 0,

View File

@@ -49,7 +49,7 @@ class LocalListViewModel(
list == null -> listOf(LoadingState)
list.isEmpty() -> listOf(
EmptyState(
icon = R.drawable.ic_storage,
icon = R.drawable.ic_empty_local,
textPrimary = R.string.text_local_holder_primary,
textSecondary = R.string.text_local_holder_secondary,
actionStringRes = R.string._import,

View File

@@ -151,7 +151,7 @@ class RemoteListViewModel(
}
private fun createEmptyState(filterState: FilterState) = EmptyState(
icon = R.drawable.ic_book_cross,
icon = R.drawable.ic_empty_search,
textPrimary = R.string.nothing_found,
textSecondary = 0,
actionStringRes = if (filterState.tags.isEmpty()) 0 else R.string.reset_filter,

View File

@@ -35,7 +35,7 @@ class SearchViewModel(
list == null -> listOf(LoadingState)
list.isEmpty() -> listOf(
EmptyState(
icon = R.drawable.ic_book_search,
icon = R.drawable.ic_empty_search,
textPrimary = R.string.nothing_found,
textSecondary = R.string.text_search_holder_secondary,
actionStringRes = 0,

View File

@@ -42,7 +42,7 @@ class MultiSearchViewModel(
loading -> LoadingState
error != null -> error.toErrorState(canRetry = true)
else -> EmptyState(
icon = R.drawable.ic_book_search,
icon = R.drawable.ic_empty_search,
textPrimary = R.string.nothing_found,
textSecondary = R.string.text_search_holder_secondary,
actionStringRes = 0,

View File

@@ -27,7 +27,7 @@ class SuggestionsViewModel(
when {
list.isEmpty() -> listOf(
EmptyState(
icon = R.drawable.ic_book_cross,
icon = R.drawable.ic_empty_suggestions,
textPrimary = R.string.nothing_found,
textSecondary = R.string.text_suggestion_holder,
actionStringRes = 0,

View File

@@ -39,7 +39,7 @@ class FeedViewModel(
add(header)
add(
EmptyState(
icon = R.drawable.ic_feed,
icon = R.drawable.ic_empty_feed,
textPrimary = R.string.text_empty_holder_primary,
textSecondary = R.string.text_feed_holder,
actionStringRes = 0,