From befe856e756ac61c66f898d890356f6b4e467118 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 25 Oct 2019 22:33:37 +0800 Subject: [PATCH] up --- .../legado/app/ui/main/bookshelf/BooksFragment.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksFragment.kt index 41278ab9e..2bef1ad1d 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksFragment.kt @@ -86,14 +86,12 @@ class BooksFragment : VMBaseFragment(R.layout.fragment_books), -3 -> App.db.bookDao().observeAudio() else -> App.db.bookDao().observeByGroup(groupId) } - bookshelfLiveData?.observe( - this, - Observer { - val diffResult = - DiffUtil.calculateDiff(BooksDiffCallBack(booksAdapter.getItems(), it)) - booksAdapter.setItems(it, false) - diffResult.dispatchUpdatesTo(booksAdapter) - }) + bookshelfLiveData?.observe(this, Observer { + val diffResult = + DiffUtil.calculateDiff(BooksDiffCallBack(booksAdapter.getItems(), it)) + booksAdapter.setItems(it, false) + diffResult.dispatchUpdatesTo(booksAdapter) + }) } override fun open(book: Book) {