Yes. Probably that’s the problem. I don’t see any ...
# flow
Yes. Probably that’s the problem. I don’t see any fast solution for solving this with MutableStateFlow. Probably simply MutableStateFlow is not the correct class to use in this case
I change an attribute of a list’s element and re assign the changed list
Do the items in the list implement
taking that changed attribute into account?
Those items are instances of data class that if I remember correctly automatically implements equal using its own attributes
Copy code
data class SelectionWrapper<T: Any>(val value: T, var selected: Boolean)
And you’re saying you have
Copy code
val list = listOf(selectionWrappers)
mutableStateFlow.value = list
list[0].selected = true
mutableStateFlow.value = list
and the new list is not emitted?
Wait I send you an example
Copy code
val mutableStateFlow = MutableStateFlow(arrayOf<Person>())
fun start() = CoroutineScope(Dispatchers.Main).launch {
    mutableStateFlow.onEach {
        Log.i("MutableStateFlow", "$it")

    mutableStateFlow.value = arrayOf(Person("Dario", "P"))
    val array = mutableStateFlow.value
    array[0].name = "Da"
    mutableStateFlow.value = array

data class Person(var name: String, val surname: String)
With more simple class