public fun leaveThread() { messageMode = MessageMode.Normal messagesState = messagesState.copy(selectedMessageState = null) threadMessagesState = MessagesState() lastSeenThreadMessage = null threadJob?.cancel() }
Leaves the thread we're in and resets the state of the [messageMode] and both of the [MessagesState]s.