File tree Expand file tree Collapse file tree
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -310,7 +310,10 @@ internal fun BoxScope.DefaultMessagesHelperContent(
310310 // Keep track of the last new message state that triggered a scroll to bottom.
311311 // If a configuration change happens, we want to keep the same state
312312 // and not scroll to bottom again if the newMessageState is the same as before the configuration change.
313- var lastScrollToBottomOnNewMessage by rememberSaveable(saver = MutableStateNewMessageStateSaver ) {
313+ var lastScrollToBottomOnNewMessage by rememberSaveable(
314+ isMessageInThread,
315+ saver = MutableStateNewMessageStateSaver ,
316+ ) {
314317 mutableStateOf(newMessageState)
315318 }
316319
@@ -344,9 +347,7 @@ internal fun BoxScope.DefaultMessagesHelperContent(
344347 count = messagesState.unreadCount,
345348 onClick = {
346349 scrollToBottom {
347- coroutineScope.launch {
348- lazyListState.scrollToItem(0 )
349- }
350+ coroutineScope.launch { lazyListState.scrollToItem(0 ) }
350351 }
351352 },
352353 )
You can’t perform that action at this time.
0 commit comments