compose: use ic_refresh icon on retryable error placeholders
This commit is contained in:
@@ -42,7 +42,7 @@ internal fun CategoriesContent(
|
||||
if (state is ViewState.Error) {
|
||||
Placeholder(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
painter = painterResource(R.drawable.ic_disclaimer),
|
||||
painter = painterResource(R.drawable.ic_refresh),
|
||||
message = stringResource(R.string.error),
|
||||
actionLabel = stringResource(R.string.action_retry),
|
||||
onAction = { viewModel.getCategoryList(categoryType) }
|
||||
|
||||
@@ -42,7 +42,7 @@ fun CategoryBrowseScreen(
|
||||
if (uiState is ViewState.Error) {
|
||||
Placeholder(
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
painter = painterResource(R.drawable.ic_disclaimer),
|
||||
painter = painterResource(R.drawable.ic_refresh),
|
||||
message = stringResource(R.string.error),
|
||||
actionLabel = stringResource(R.string.action_retry),
|
||||
onAction = { viewModel.fetchNextPage() }
|
||||
|
||||
@@ -56,7 +56,7 @@ fun ExpandedStreamBrowseScreen(
|
||||
is LoadState.Error -> {
|
||||
Placeholder(
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
painter = painterResource(R.drawable.ic_disclaimer),
|
||||
painter = painterResource(R.drawable.ic_refresh),
|
||||
message = stringResource(R.string.error),
|
||||
actionLabel = stringResource(R.string.action_retry),
|
||||
onAction = { apps.retry() }
|
||||
|
||||
@@ -75,7 +75,7 @@ private fun ScreenContent(
|
||||
is LoadState.Error -> {
|
||||
Placeholder(
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
painter = painterResource(R.drawable.ic_disclaimer),
|
||||
painter = painterResource(R.drawable.ic_refresh),
|
||||
message = stringResource(R.string.error),
|
||||
actionLabel = stringResource(R.string.action_retry),
|
||||
onAction = { apps.retry() }
|
||||
|
||||
@@ -227,7 +227,7 @@ private fun ScreenContentError(message: String? = null, onRetry: (() -> Unit)? =
|
||||
) { paddingValues ->
|
||||
Placeholder(
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
painter = painterResource(R.drawable.ic_apps_outage),
|
||||
painter = painterResource(R.drawable.ic_refresh),
|
||||
message = message ?: stringResource(R.string.toast_app_unavailable),
|
||||
actionLabel = onRetry?.let { stringResource(R.string.action_retry) },
|
||||
onAction = onRetry
|
||||
|
||||
@@ -116,7 +116,7 @@ private fun ScreenContent(
|
||||
is LoadState.Error -> {
|
||||
Placeholder(
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
painter = painterResource(R.drawable.ic_disclaimer),
|
||||
painter = painterResource(R.drawable.ic_refresh),
|
||||
message = stringResource(R.string.error),
|
||||
actionLabel = stringResource(R.string.action_retry),
|
||||
onAction = { reviews.retry() }
|
||||
|
||||
@@ -98,7 +98,7 @@ private fun ScreenContent(
|
||||
is LoadState.Error -> {
|
||||
Placeholder(
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
painter = painterResource(R.drawable.ic_disclaimer),
|
||||
painter = painterResource(R.drawable.ic_refresh),
|
||||
message = stringResource(R.string.error),
|
||||
actionLabel = stringResource(R.string.action_retry),
|
||||
onAction = { apps.retry() }
|
||||
|
||||
@@ -252,7 +252,7 @@ private fun ScreenContent(
|
||||
is LoadState.Error -> {
|
||||
Placeholder(
|
||||
modifier = Modifier.padding(paddingValues),
|
||||
painter = painterResource(R.drawable.ic_disclaimer),
|
||||
painter = painterResource(R.drawable.ic_refresh),
|
||||
message = stringResource(R.string.error),
|
||||
actionLabel = stringResource(R.string.action_retry),
|
||||
onAction = { results.retry() }
|
||||
|
||||
Reference in New Issue
Block a user