compose: use ic_refresh icon on retryable error placeholders

This commit is contained in:
Rahul Patel
2026-05-20 16:46:41 +05:30
parent 272870ddd2
commit eada663bfb
9 changed files with 32 additions and 8 deletions

View File

@@ -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) }

View File

@@ -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() }

View File

@@ -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() }

View File

@@ -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() }

View File

@@ -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

View File

@@ -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() }

View File

@@ -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() }

View File

@@ -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() }