Adjust app theme and add new empty states

This commit is contained in:
Zakhar Timoshenko
2022-10-15 18:18:59 +03:00
parent 74717e2b93
commit b00b2e406e
25 changed files with 271 additions and 365 deletions

View File

@@ -34,7 +34,7 @@ fun chapterListItemAD(
when (item.status) {
FLAG_UNREAD -> {
binding.textViewNumber.setBackgroundResource(R.drawable.bg_badge_default)
binding.textViewNumber.setTextColor(context.getThemeColor(android.R.attr.textColorSecondaryInverse))
binding.textViewNumber.setTextColor(context.getThemeColor(com.google.android.material.R.attr.colorOnTertiary))
}
FLAG_CURRENT -> {
binding.textViewNumber.setBackgroundResource(R.drawable.bg_badge_accent)
@@ -53,4 +53,4 @@ fun chapterListItemAD(
binding.imageViewDownloaded.isVisible = item.hasFlag(FLAG_DOWNLOADED)
binding.imageViewNew.isVisible = item.hasFlag(FLAG_NEW)
}
}
}

View File

@@ -61,7 +61,7 @@ class ExploreViewModel @Inject constructor(
sources.mapTo(result) { ExploreItem.Source(it) }
} else {
result += ExploreItem.EmptyHint(
icon = R.drawable.ic_empty_search,
icon = R.drawable.ic_empty_common,
textPrimary = R.string.no_manga_sources,
textSecondary = R.string.no_manga_sources_text,
actionStringRes = R.string.manage,

View File

@@ -163,7 +163,7 @@ class RemoteListViewModel @AssistedInject constructor(
}
private fun createEmptyState(canResetFilter: Boolean) = EmptyState(
icon = R.drawable.ic_empty_search,
icon = R.drawable.ic_empty_common,
textPrimary = R.string.nothing_found,
textSecondary = 0,
actionStringRes = if (canResetFilter) R.string.reset_filter else 0,

View File

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

View File

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

View File

@@ -156,7 +156,7 @@ class ShelfViewModel @Inject constructor(
}
} else {
result += EmptyHint(
icon = R.drawable.ic_empty_suggestions,
icon = R.drawable.ic_empty_common,
textPrimary = R.string.network_unavailable,
textSecondary = R.string.network_unavailable_hint,
actionStringRes = R.string.manage,

View File

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