From bddcb99177bdb0db28dfd1f89b21f7fa6d2e8b02 Mon Sep 17 00:00:00 2001 From: OneWay Date: Tue, 15 Sep 2026 23:19:29 +0800 Subject: [PATCH] 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. --- .../example/research/ui/article/ArticleScreen.kt | 13 ++----------- app/src/main/res/values-ru/strings.xml | 1 - app/src/main/res/values/strings.xml | 1 - 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/example/research/ui/article/ArticleScreen.kt b/app/src/main/java/com/example/research/ui/article/ArticleScreen.kt index ca62e7e..66f697c 100644 --- a/app/src/main/java/com/example/research/ui/article/ArticleScreen.kt +++ b/app/src/main/java/com/example/research/ui/article/ArticleScreen.kt @@ -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) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 26fb402..7ab2cce 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -13,7 +13,6 @@ Русский Системный Очистить поиск - Статья не выбрана Вернуться к поиску Не удалось проверить статус словарей Ошибка загрузки: %1$s diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index fd82745..5fd1ba5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -13,7 +13,6 @@ Russian System Clear search - No article selected Return to search Failed to check dictionary status Loading error: %1$s