From 359d11bf606220c216b0d7167e6f3d74c914e36a Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 5 Aug 2019 11:04:03 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/ui/search/SearchActivity.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) }) }