Skip to content

Commit 16e7f65

Browse files
committed
Changed RViewAdapter.kt MutableList to ArrayList
Signed-off-by: plsankar <plsankar1996@gmail.com>
1 parent 3cd5e1c commit 16e7f65

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

codekit/src/main/java/com/ctrlbytes/codekit/ui/recyclerview/RViewAdapter.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import java.util.*
3131
@Suppress("unused")
3232
abstract class RViewAdapter<T, RVH : RViewHolder<T>> : RecyclerView.Adapter<RVH>() {
3333

34-
private var items: MutableList<T> = ArrayList()
34+
private var items: ArrayList<T> = ArrayList()
3535
private var mRViewListener: RViewListener<T>? = null
3636

3737
fun getItemAt(position: Int): T {
@@ -78,7 +78,8 @@ abstract class RViewAdapter<T, RVH : RViewHolder<T>> : RecyclerView.Adapter<RVH>
7878
}
7979

8080
fun setItems(mItems: MutableList<T>) {
81-
items = mItems
81+
items.clear()
82+
items.addAll(mItems)
8283
notifyDataSetChanged()
8384
}
8485

0 commit comments

Comments
 (0)