public fun scrollToSelectedMessage(message: Message) { val isMessageInList = currentMessagesState.messageItems.firstOrNull { it is MessageItemState && it.message.id == message.id } != null  if (isMessageInList) { focusMessage(message.id) } else { scrollToMessage = message loadMessage(message = message) } }
Scrolls to message if in list otherwise get the message from backend.