优化搜索历史显示
This commit is contained in:
1 parent
0e82d0a2b9
commit
80ca4c88ce
1 file changed
+3
-3
@@ -202,10 +202,10 @@ class SearchActivity : VMBaseActivity<ActivityBookSearchBinding, SearchViewModel
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
searchView.setOnQueryTextFocusChangeListener { _, hasFocus ->
|
searchView.setOnQueryTextFocusChangeListener { _, hasFocus ->
|
||||||
if (!hasFocus && searchView.query.toString().trim().isEmpty()) {
|
if (binding.refreshProgressBar.isAutoLoading || (!hasFocus && adapter.isNotEmpty() && searchView.query.isNotBlank())){
|
||||||
finish()
|
visibleInputHelp(false)
|
||||||
} else {
|
} else {
|
||||||
visibleInputHelp(hasFocus)
|
visibleInputHelp(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
visibleInputHelp(true)
|
visibleInputHelp(true)
|
||||||
|
|||||||
Reference in new issue
Block a user