From 7deabeb02a86fce8a90ad3d145a4303c4063f4fe Mon Sep 17 00:00:00 2001 From: OneWay Date: Tue, 6 Oct 2026 09:42:54 +0800 Subject: [PATCH] fix(search): keep PROCESS_TEXT on the results screen handleExternalSearch auto-opened the article on an exact match, so the main screen with the search bar flashed before the article covered it. Only set the query; the article now opens from the results list. --- .../com/example/research/feature/search/SearchViewModel.kt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/main/java/com/example/research/feature/search/SearchViewModel.kt b/app/src/main/java/com/example/research/feature/search/SearchViewModel.kt index 822818d..28a850a 100644 --- a/app/src/main/java/com/example/research/feature/search/SearchViewModel.kt +++ b/app/src/main/java/com/example/research/feature/search/SearchViewModel.kt @@ -321,11 +321,7 @@ class SearchViewModel( } fun handleExternalSearch(text: String) { - viewModelScope.launch { - val sanitizedText = text.sanitizeQuery() - mutableSearchQuery.value = sanitizedText - searchAndLoadArticle(sanitizedText) - } + onSearchQueryChanged(text) } companion object {