-
public final class MessageOptionsKt
-
-
Method Summary
Modifier and Type Method Description final static UnitMessageOptions(List<MessageOptionItemState> options, Function1<MessageOptionItemState, Unit> onMessageOptionSelected, Modifier modifier, Function2<ColumnScope, MessageOptionItemState, Unit> itemContent)Displays all available MessageOptionItems. final static List<MessageOptionItemState>defaultMessageOptionsState(Message selectedMessage, User currentUser, Boolean isInThread, Set<String> ownCapabilities)Builds the default message options we show to our users. -
-
Method Detail
-
MessageOptions
@Composable() final static Unit MessageOptions(List<MessageOptionItemState> options, Function1<MessageOptionItemState, Unit> onMessageOptionSelected, Modifier modifier, Function2<ColumnScope, MessageOptionItemState, Unit> itemContent)
Displays all available MessageOptionItems.
- Parameters:
options- List of available options.onMessageOptionSelected- Handler that propagates click events on each item.modifier- Modifier for styling.itemContent- Composable that allows the user to customize the individual items shown in MessageOptions.
-
defaultMessageOptionsState
@Composable() final static List<MessageOptionItemState> defaultMessageOptionsState(Message selectedMessage, User currentUser, Boolean isInThread, Set<String> ownCapabilities)
Builds the default message options we show to our users. A different set of options is shown for pending and sent messages.
- Parameters:
selectedMessage- Currently selected message, used to callbacks.currentUser- Current user, used to expose different states for messages.isInThread- If the message is being displayed in a thread.ownCapabilities- Set of capabilities the user is given for the current channel.
-
-
-
-