|
|
@ -86,12 +86,15 @@ class BookSourceFragment : BaseFragment(R.layout.fragment_book_source), BookSour |
|
|
|
App.db.bookSourceDao().observeAll() |
|
|
|
App.db.bookSourceDao().observeAll() |
|
|
|
else |
|
|
|
else |
|
|
|
App.db.bookSourceDao().observeSearch(searchKey) |
|
|
|
App.db.bookSourceDao().observeSearch(searchKey) |
|
|
|
bookSourceLiveDate = LivePagedListBuilder(dataFactory, 2000).build() |
|
|
|
bookSourceLiveDate = LivePagedListBuilder(dataFactory, 50).build() |
|
|
|
bookSourceLiveDate?.observe(viewLifecycleOwner, Observer { adapter.submitList(it) }) |
|
|
|
bookSourceLiveDate?.observe(viewLifecycleOwner, Observer { adapter.submitList(it) }) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onQueryTextChange(newText: String?): Boolean { |
|
|
|
override fun onQueryTextChange(newText: String?): Boolean { |
|
|
|
newText?.let { initDataObserve("%$it%") } |
|
|
|
newText?.let { |
|
|
|
|
|
|
|
adapter.clearSelect() |
|
|
|
|
|
|
|
initDataObserve("%$it%") |
|
|
|
|
|
|
|
} |
|
|
|
return false |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|