pull/1198/head
gedoor 3 years ago
parent c751663fef
commit 559e3ba1a1
  1. 2
      app/src/main/java/io/legado/app/base/adapter/RecyclerAdapter.kt
  2. 1
      app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt
  3. 2
      app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleDialog.kt
  4. 3
      app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookAdapter.kt
  5. 2
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditAdapter.kt
  6. 2
      app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditAdapter.kt

@ -1,5 +1,6 @@
package io.legado.app.base.adapter
import android.annotation.SuppressLint
import android.content.Context
import android.util.SparseArray
import android.view.LayoutInflater
@ -84,6 +85,7 @@ abstract class RecyclerAdapter<ITEM, VB : ViewBinding>(protected val context: Co
}
}
@SuppressLint("NotifyDataSetChanged")
@Synchronized
fun setItems(items: List<ITEM>?) {
kotlin.runCatching {

@ -83,6 +83,7 @@ class ImportBookSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickList
}
}
@SuppressLint("NotifyDataSetChanged")
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
binding.toolBar.setBackgroundColor(primaryColor)
binding.toolBar.setTitle(R.string.import_book_source)

@ -1,5 +1,6 @@
package io.legado.app.ui.association
import android.annotation.SuppressLint
import android.content.Context
import android.content.DialogInterface
import android.os.Bundle
@ -65,6 +66,7 @@ class ImportReplaceRuleDialog : BaseDialogFragment() {
return inflater.inflate(R.layout.dialog_recycler_view, container)
}
@SuppressLint("NotifyDataSetChanged")
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
binding.toolBar.setBackgroundColor(primaryColor)
binding.toolBar.setTitle(R.string.import_replace_rule)

@ -1,5 +1,6 @@
package io.legado.app.ui.book.arrange
import android.annotation.SuppressLint
import android.content.Context
import android.view.View
import android.view.ViewGroup
@ -88,6 +89,7 @@ class ArrangeBookAdapter(context: Context, val callBack: CallBack) :
}
}
@SuppressLint("NotifyDataSetChanged")
fun selectAll(selectAll: Boolean) {
if (selectAll) {
getItems().forEach {
@ -100,6 +102,7 @@ class ArrangeBookAdapter(context: Context, val callBack: CallBack) :
callBack.upSelectCount()
}
@SuppressLint("NotifyDataSetChanged")
fun revertSelection() {
getItems().forEach {
if (selectedBooks.contains(it)) {

@ -1,5 +1,6 @@
package io.legado.app.ui.book.source.edit
import android.annotation.SuppressLint
import android.text.Editable
import android.text.TextWatcher
import android.view.LayoutInflater
@ -12,6 +13,7 @@ import io.legado.app.databinding.ItemSourceEditBinding
class BookSourceEditAdapter : RecyclerView.Adapter<BookSourceEditAdapter.MyViewHolder>() {
var editEntities: ArrayList<EditEntity> = ArrayList()
@SuppressLint("NotifyDataSetChanged")
set(value) {
field = value
notifyDataSetChanged()

@ -1,5 +1,6 @@
package io.legado.app.ui.rss.source.edit
import android.annotation.SuppressLint
import android.text.Editable
import android.text.TextWatcher
import android.view.LayoutInflater
@ -12,6 +13,7 @@ import io.legado.app.databinding.ItemSourceEditBinding
class RssSourceEditAdapter : RecyclerView.Adapter<RssSourceEditAdapter.MyViewHolder>() {
var editEntities: ArrayList<EditEntity> = ArrayList()
@SuppressLint("NotifyDataSetChanged")
set(value) {
field = value
notifyDataSetChanged()

Loading…
Cancel
Save