Fix concat adapter stable Ids
This commit is contained in:
parent
98f1c6d87f
commit
b10a27d4dd
|
@ -23,6 +23,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.ConcatAdapter
|
||||
import androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.airbnb.epoxy.OnModelBuildFinishedListener
|
||||
import com.airbnb.mvrx.fragmentViewModel
|
||||
|
@ -64,7 +65,12 @@ class HomeRoomListFragment :
|
|||
|
||||
private val roomListViewModel: HomeRoomListViewModel by fragmentViewModel()
|
||||
private lateinit var sharedQuickActionsViewModel: RoomListQuickActionsSharedActionViewModel
|
||||
private var concatAdapter = ConcatAdapter()
|
||||
private var concatAdapter = ConcatAdapter(
|
||||
ConcatAdapter.Config.Builder()
|
||||
.setIsolateViewTypes(true)
|
||||
.setStableIdMode(StableIdMode.ISOLATED_STABLE_IDS).build(),
|
||||
emptyList()
|
||||
)
|
||||
private lateinit var firstItemObserver: FirstItemUpdatedObserver
|
||||
private var modelBuildListener: OnModelBuildFinishedListener? = null
|
||||
|
||||
|
|
Loading…
Reference in New Issue