private fun updateMessages(messages: List<MessageListItemState>) { if (isInThread) { this.threadMessagesState = threadMessagesState.copy(messageItems = messages) } else { this.messagesState = messagesState.copy(messageItems = messages) } }
Updates the current message state with new messages.