From 73a18481fc59ca29b40f315b397f9bfb8ec92161 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 19 Aug 2019 11:19:43 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt index de6f4681a..13799eecf 100644 --- a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt @@ -29,8 +29,8 @@ class ChangeSourceViewModel(application: Application) : BaseViewModel(applicatio } fun upAdapter() { - val diffResult = DiffUtil.calculateDiff(DiffCallBack(arrayListOf(), searchBooks.toList())) callBack?.adapter()?.let { + val diffResult = DiffUtil.calculateDiff(DiffCallBack(it.getItems(), searchBooks.toList())) diffResult.dispatchUpdatesTo(it) } }