File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
adapterDSL/src/main/java/com/glimmer/dsl/adapter/ext Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11package com.glimmer.dsl.adapter.ext
22
33import android.content.Context
4- import androidx.recyclerview.widget.DiffUtil
54import androidx.recyclerview.widget.GridLayoutManager
65import androidx.recyclerview.widget.LinearLayoutManager
76import androidx.recyclerview.widget.RecyclerView
@@ -50,7 +49,10 @@ class AdapterSetup internal constructor(private val recyclerView: RecyclerView)
5049
5150fun RecyclerView.submitDataSource (items : List <Any >, append : Boolean = false) {
5251 val list: List <Any > = if (append) {
53- val list: ArrayList <Any > = (adapter as ? CommonListAdapterDsl )?.currentList as ArrayList <Any >
52+ val list: ArrayList <Any > = arrayListOf ()
53+ (adapter as ? CommonListAdapterDsl )?.currentList?.apply {
54+ list.addAll(this )
55+ }
5456 list.addAll(items)
5557 list
5658 } else {
You can’t perform that action at this time.
0 commit comments