Skip to content

Commit

Permalink
fix: mention crashing on select after sending message (#2055)
Browse files Browse the repository at this point in the history
Co-authored-by: Mateusz <[email protected]>
Co-authored-by: Mohamad Jaara <[email protected]>
  • Loading branch information
3 people authored Aug 3, 2023
1 parent c4ac90b commit b7560ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ fun MessageComposer(
messageListContent = messageListContent,
onSendButtonClicked = {
onSendMessageBundle(messageCompositionHolder.toMessageBundle())
onMessageSend()
onClearMentionSearchResult()
clearMessage()
},
onPingOptionClicked = { onSendMessageBundle(Ping) },
onAttachmentPicked = { onSendMessageBundle(AttachmentPickedBundle(it)) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class MessageComposerStateHolder(
messageCompositionInputStateHolder.clearFocus()
}

fun onMessageSend() {
fun clearMessage() {
messageCompositionHolder.clearMessage()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class MessageComposerStateHolderTest {
fun `given state, when message is sent, then message is cleared`() = runTest {
// given
// when
state.onMessageSend()
state.clearMessage()

// then
assertEquals(
Expand Down

0 comments on commit b7560ee

Please sign in to comment.