pull/38/head
kunfei 5 years ago
parent c310d66177
commit 73a418253b
  1. 3
      app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt

@ -53,7 +53,6 @@ class SearchActivity : VMBaseActivity<SearchViewModel>(R.layout.activity_book_se
initOtherView() initOtherView()
initData() initData()
initIntent() initIntent()
upHistory()
} }
override fun onCompatCreateOptionsMenu(menu: Menu): Boolean { override fun onCompatCreateOptionsMenu(menu: Menu): Boolean {
@ -167,6 +166,8 @@ class SearchActivity : VMBaseActivity<SearchViewModel>(R.layout.activity_book_se
private fun initIntent() { private fun initIntent() {
intent.getStringExtra("key")?.let { intent.getStringExtra("key")?.let {
search_view.setQuery(it, true) search_view.setQuery(it, true)
} ?: let {
search_view.requestFocus()
} }
} }

Loading…
Cancel
Save