From fb69380693c3c1c37834f262c41ca4521bafedcc Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 2 Sep 2019 22:59:31 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/booksource/BookSourceAdapter.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/booksource/BookSourceAdapter.kt b/app/src/main/java/io/legado/app/ui/booksource/BookSourceAdapter.kt index 0d15be516..4faf0de8e 100644 --- a/app/src/main/java/io/legado/app/ui/booksource/BookSourceAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/booksource/BookSourceAdapter.kt @@ -10,7 +10,7 @@ import androidx.recyclerview.widget.RecyclerView import io.legado.app.R import io.legado.app.data.entities.BookSource import io.legado.app.help.ItemTouchCallback.OnItemTouchCallbackListener -import io.legado.app.lib.theme.ThemeStore +import io.legado.app.lib.theme.backgroundColor import kotlinx.android.synthetic.main.item_book_source.view.* import org.jetbrains.anko.sdk27.listeners.onClick @@ -78,11 +78,8 @@ class BookSourceAdapter(val callBack: CallBack) : class MyViewHolder(view: View) : RecyclerView.ViewHolder(view) { - init { - itemView.setBackgroundColor(ThemeStore.backgroundColor(itemView.context)) - } - fun bind(bookSource: BookSource, callBack: CallBack) = with(itemView) { + this.setBackgroundColor(context.backgroundColor) if (bookSource.bookSourceGroup.isNullOrEmpty()) { cb_book_source.text = bookSource.bookSourceName } else {