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