Compare commits
2
Commits
05b80f21f4
...
c2b2bf1c8a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2b2bf1c8a | ||
|
|
30aa86f39f |
No files matched your search
@@ -122,6 +122,7 @@ class SearchViewModel(
|
||||
SearchAction.ClearQuery -> {
|
||||
mutableSearchQuery.value = ""
|
||||
savedStateHandle[KEY_SEARCH_QUERY] = ""
|
||||
clearArticle()
|
||||
}
|
||||
is SearchAction.ArticleClicked -> {
|
||||
articleHistory.clear()
|
||||
@@ -136,6 +137,9 @@ class SearchViewModel(
|
||||
fun onSearchQueryChanged(query: String) {
|
||||
val sanitized = query.sanitizeQuery().trim()
|
||||
mutableSearchQuery.value = sanitized
|
||||
if (sanitized.isBlank()) {
|
||||
clearArticle()
|
||||
}
|
||||
// Debounce SavedStateHandle writes to reduce disk I/O
|
||||
debounceSaveQueryJob?.cancel()
|
||||
debounceSaveQueryJob = viewModelScope.launch {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
aboutlibraries = "15.2.0"
|
||||
activity_compose = "1.13.0"
|
||||
agp = "9.3.1"
|
||||
compose_bom = "2026.08.00"
|
||||
compose_bom = "2026.09.00"
|
||||
core = "1.19.0"
|
||||
datastore_preferences = "1.2.1"
|
||||
documentfile = "1.1.0"
|
||||
|
||||
Reference in new issue
Block a user