File tree Expand file tree Collapse file tree
app/src/main/java/com/nextcloud/talk/chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ import androidx.compose.runtime.CompositionLocalProvider
6969import androidx.compose.runtime.LaunchedEffect
7070import androidx.compose.runtime.MutableState
7171import androidx.compose.runtime.SideEffect
72+ import androidx.compose.runtime.collectAsState
7273import androidx.compose.runtime.derivedStateOf
7374import androidx.compose.runtime.getValue
7475import androidx.compose.runtime.mutableStateOf
@@ -694,7 +695,7 @@ class ChatActivity :
694695 }
695696 }
696697 }.value.mapNotNull { key ->
697- val messageItem = chatViewModel.uiState.value.items.firstOrNull { it.stableKey() == key }
698+ val messageItem = chatViewModel.uiState.collectAsState(). value.items.firstOrNull { it.stableKey() == key }
698699 val message = messageItem?.messageOrNull()
699700 var result: String? = null
700701 message?.let {
You can’t perform that action at this time.
0 commit comments