diff --git a/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt b/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt index ac24f5ab8..80cd4a219 100644 --- a/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt +++ b/app/src/main/java/io/legado/app/ui/search/SearchActivity.kt @@ -28,7 +28,6 @@ class SearchActivity : VMBaseActivity(R.layout.activity_search) override fun onActivityCreated(savedInstanceState: Bundle?) { initRecyclerView() initSearchView() - initData(0L) } private fun initSearchView() { @@ -70,7 +69,7 @@ class SearchActivity : VMBaseActivity(R.layout.activity_search) private fun initData(startTime: Long) { searchBookData?.removeObservers(this) - searchBookData = LivePagedListBuilder(App.db.searchBookDao().observeAll(), 30).build() + searchBookData = LivePagedListBuilder(App.db.searchBookDao().observeNew(startTime), 30).build() searchBookData?.observe(this, Observer { adapter.submitList(it) }) }