mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 09:25:49 +03:00
Fix concat adapter stable Ids
This commit is contained in:
parent
98f1c6d87f
commit
b10a27d4dd
1 changed files with 7 additions and 1 deletions
|
@ -23,6 +23,7 @@ import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.ConcatAdapter
|
import androidx.recyclerview.widget.ConcatAdapter
|
||||||
|
import androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import com.airbnb.epoxy.OnModelBuildFinishedListener
|
import com.airbnb.epoxy.OnModelBuildFinishedListener
|
||||||
import com.airbnb.mvrx.fragmentViewModel
|
import com.airbnb.mvrx.fragmentViewModel
|
||||||
|
@ -64,7 +65,12 @@ class HomeRoomListFragment :
|
||||||
|
|
||||||
private val roomListViewModel: HomeRoomListViewModel by fragmentViewModel()
|
private val roomListViewModel: HomeRoomListViewModel by fragmentViewModel()
|
||||||
private lateinit var sharedQuickActionsViewModel: RoomListQuickActionsSharedActionViewModel
|
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 lateinit var firstItemObserver: FirstItemUpdatedObserver
|
||||||
private var modelBuildListener: OnModelBuildFinishedListener? = null
|
private var modelBuildListener: OnModelBuildFinishedListener? = null
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue