搜索进行时,随menuItem点击刷新

pull/74/head
Administrator 5 years ago
parent f016438fbd
commit 5ed5352634
  1. 6
      app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt

@ -76,6 +76,9 @@ class SearchActivity : VMBaseActivity<SearchViewModel>(R.layout.activity_book_se
!getPrefBoolean(PreferKey.precisionSearch)
)
precisionSearchMenuItem?.isChecked = getPrefBoolean(PreferKey.precisionSearch)
search_view.query.toString().trim()?.let {
search_view.setQuery(it, true)
}
}
R.id.menu_source_manage -> startActivity<BookSourceActivity>()
else -> if (item.groupId == R.id.source_group) {
@ -85,6 +88,9 @@ class SearchActivity : VMBaseActivity<SearchViewModel>(R.layout.activity_book_se
} else {
putPrefString("searchGroup", item.title.toString())
}
search_view.query.toString().trim()?.let {
search_view.setQuery(it, true)
}
}
}
return super.onCompatOptionsItemSelected(item)

Loading…
Cancel
Save