fixed search history not showing
This commit is contained in:
parent
601e2db741
commit
bfdc7df88a
2 changed files with 9 additions and 9 deletions
|
|
@ -388,15 +388,15 @@ class HomeFragment : Fragment(), HomeAdapter.OnItemClickListener, OnClickListene
|
|||
}else{
|
||||
searchView!!.editText.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, R.drawable.ic_plus, 0)
|
||||
}
|
||||
val suggestions = if (sharedPreferences!!.getBoolean("search_suggestions", false)){
|
||||
withContext(Dispatchers.IO){
|
||||
if (it!!.isEmpty()) {
|
||||
resultViewModel.getSearchHistory().map { it.query }
|
||||
}else{
|
||||
infoUtil!!.getSearchSuggestions(it.toString())
|
||||
}
|
||||
val suggestions = withContext(Dispatchers.IO){
|
||||
if (it!!.isEmpty()) {
|
||||
resultViewModel.getSearchHistory().map { it.query }
|
||||
}else if (sharedPreferences!!.getBoolean("search_suggestions", false)){
|
||||
infoUtil!!.getSearchSuggestions(it.toString())
|
||||
}else{
|
||||
emptyList()
|
||||
}
|
||||
} else emptyList()
|
||||
}
|
||||
|
||||
if (it!!.isEmpty()){
|
||||
for (i in suggestions.indices) {
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@
|
|||
<string name="socks5_proxy_summary">Use the specified HTTP/HTTPS/SOCKS proxy</string>
|
||||
<string name="socks5_proxy">Socks5 Proxy URL</string>
|
||||
<string name="search_suggestions">Search Suggestions</string>
|
||||
<string name="search_suggestions_summary">Get search suggestions from google</string>
|
||||
<string name="search_suggestions_summary">Get search suggestions from Google</string>
|
||||
<string name="preferred_format_id_summary">Select the format with this ID in the download card</string>
|
||||
<string name="misc">Misc</string>
|
||||
<string name="general">General</string>
|
||||
|
|
|
|||
Loading…
Reference in a new issue