Add test on MessagesViewTest: clicking on a custom emoji emits the expected Events.
And fix a bug, the Event `CustomReactionEvents.DismissCustomReactionSheet` is actually managed by the BottomSheet itself.
This commit is contained in:
parent
64435db282
commit
e8ad3c8f9c
3 changed files with 47 additions and 2 deletions
|
|
@ -154,9 +154,10 @@ fun aReactionSummaryState(
|
|||
)
|
||||
|
||||
fun aCustomReactionState(
|
||||
target: CustomReactionState.Target = CustomReactionState.Target.None,
|
||||
eventSink: (CustomReactionEvents) -> Unit = {},
|
||||
) = CustomReactionState(
|
||||
target = CustomReactionState.Target.None,
|
||||
target = target,
|
||||
selectedEmoji = persistentSetOf(),
|
||||
eventSink = eventSink,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -250,7 +250,6 @@ fun MessagesView(
|
|||
state = state.customReactionState,
|
||||
onEmojiSelected = { eventId, emoji ->
|
||||
state.eventSink(MessagesEvents.ToggleReaction(emoji.unicode, eventId))
|
||||
state.customReactionState.eventSink(CustomReactionEvents.DismissCustomReactionSheet)
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue