fix: drop "No article selected" flash on back from article
ClearArticle nulls state before exit transition ends, so the outgoing screen briefly rendered the null-branch fallback in the title bar. Render empty title/content for null state; remove article_no_selected.
This commit is contained in:
1 parent
2dadfa11e9
commit
bddcb99177
3 files changed
+2
-13
No files matched your search
@@ -196,16 +196,7 @@ fun ArticleContent(
|
||||
}
|
||||
}
|
||||
null -> {
|
||||
Column(
|
||||
modifier = modifier.fillMaxSize(),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.article_no_selected),
|
||||
style = MaterialTheme.typography.bodyLarge
|
||||
)
|
||||
}
|
||||
Box(modifier = modifier.fillMaxSize())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,7 +212,7 @@ fun ArticleTitleBar(
|
||||
is ArticleState.Loading -> articleState.title
|
||||
is ArticleState.Success -> articleState.title
|
||||
is ArticleState.Error -> articleState.title
|
||||
null -> stringResource(R.string.article_no_selected)
|
||||
null -> ""
|
||||
}
|
||||
|
||||
val backIcon = painterResource(R.drawable.ic_arrow_back)
|
||||
|
||||
Reference in new issue
Block a user