-
public final class MessagesScreenKt
-
-
Method Summary
Modifier and Type Method Description final static UnitMessagesScreen(MessagesViewModelFactory viewModelFactory, Boolean showHeader, MessageContentFactory messageContentFactory, ReactionSorting reactionSorting, Function0<Unit> onBackPressed, Function1<Channel, Unit> onHeaderTitleClick, Function0<Unit> onChannelAvatarClick, Function1<LinkPreview, Unit> onComposerLinkPreviewClick, Function2<Message, String, Unit> onMessageLinkClick, Function1<User, Unit> onUserAvatarClick, Function1<User, Unit> onUserMentionClick, Boolean skipPushNotification, Boolean skipEnrichUrl, Boolean showAnonymousAvatar, Arrangement.Vertical verticalArrangement, ThreadMessagesStart threadMessagesStart, Function1<Function0<Unit>, Unit> topBarContent, Function0<Unit> bottomBarContent)Default root Messages screen component, that provides the necessary ViewModels and connects all the data handling operations, as well as some basic actions, like back pressed handling. final static UnitMessageMenus(BoxScope $self, MessageListViewModel listViewModel, MessageComposerViewModel composerViewModel, Boolean skipPushNotification, Boolean skipEnrichUrl)Contains the various menus and pickers the user can use to interact with messages. final static UnitAttachmentsPickerMenu(BoxScope $self, MessageListViewModel listViewModel, AttachmentsPickerViewModel attachmentsPickerViewModel, MessageComposerViewModel composerViewModel)Contains the attachments picker menu wrapped inside of an animated composable. final static UnitMessageModerationDialog(MessageListViewModel listViewModel, MessageComposerViewModel composerViewModel, Boolean skipPushNotification, Boolean skipEnrichUrl)Contains the dialog for a message that needs to be moderated. final static UnitMessageDialogs(MessageListViewModel listViewModel)Contains the message dialogs used to prompt the user with message flagging and deletion actions final static UnitPollDialogs(MessageListViewModel listViewModel, Boolean showAnonymousAvatar)-
-
Method Detail
-
MessagesScreen
@Composable() final static Unit MessagesScreen(MessagesViewModelFactory viewModelFactory, Boolean showHeader, MessageContentFactory messageContentFactory, ReactionSorting reactionSorting, Function0<Unit> onBackPressed, Function1<Channel, Unit> onHeaderTitleClick, Function0<Unit> onChannelAvatarClick, Function1<LinkPreview, Unit> onComposerLinkPreviewClick, Function2<Message, String, Unit> onMessageLinkClick, Function1<User, Unit> onUserAvatarClick, Function1<User, Unit> onUserMentionClick, Boolean skipPushNotification, Boolean skipEnrichUrl, Boolean showAnonymousAvatar, Arrangement.Vertical verticalArrangement, ThreadMessagesStart threadMessagesStart, Function1<Function0<Unit>, Unit> topBarContent, Function0<Unit> bottomBarContent)
Default root Messages screen component, that provides the necessary ViewModels and connects all the data handling operations, as well as some basic actions, like back pressed handling.
Because this screen can be shown only if there is an active/selected Channel, the user must provide a viewModelFactory that contains the channel ID, in order to load up all the data. Otherwise, we can't show the UI.
- Parameters:
viewModelFactory- The factory used to build ViewModels and power the behavior.showHeader- If we're showing the header or not.reactionSorting- The sorting type for reactions.onBackPressed- Handler for when the user taps on the Back button and/or the system back button.onHeaderTitleClick- Handler for when the user taps on the header section.onChannelAvatarClick- Handler called when the user taps on the channel avatar.onUserAvatarClick- Handler when users avatar is clicked.skipPushNotification- If new messages should skip triggering a push notification when sent.skipEnrichUrl- If new messages being sent, or existing ones being updated should skip enriching the URL.showAnonymousAvatar- If the user avatar should be shown on comments for polls with anonymous voting visibility.verticalArrangement- Vertical arrangement of the regular message list.threadMessagesStart- Thread messages start at the bottom or top of the screen.topBarContent- custom top bar content to be displayed on top of the messages list.bottomBarContent- custom bottom bar content to be displayed at the bottom of the messages list.
-
MessageMenus
@Composable() final static Unit MessageMenus(BoxScope $self, MessageListViewModel listViewModel, MessageComposerViewModel composerViewModel, Boolean skipPushNotification, Boolean skipEnrichUrl)
Contains the various menus and pickers the user can use to interact with messages.
- Parameters:
listViewModel- The MessageListViewModel used to read state from.composerViewModel- The MessageComposerViewModel used to read state from.skipPushNotification- If the message should skip triggering a push notification when sent.skipEnrichUrl- If the message should skip enriching the URL.
-
AttachmentsPickerMenu
@Composable() final static Unit AttachmentsPickerMenu(BoxScope $self, MessageListViewModel listViewModel, AttachmentsPickerViewModel attachmentsPickerViewModel, MessageComposerViewModel composerViewModel)
Contains the attachments picker menu wrapped inside of an animated composable.
- Parameters:
attachmentsPickerViewModel- The AttachmentsPickerViewModel used to read state and perform actions.composerViewModel- The MessageComposerViewModel used to read state and perform actions.
-
MessageModerationDialog
@Composable() final static Unit MessageModerationDialog(MessageListViewModel listViewModel, MessageComposerViewModel composerViewModel, Boolean skipPushNotification, Boolean skipEnrichUrl)
Contains the dialog for a message that needs to be moderated.
- Parameters:
listViewModel- The MessageListViewModel used to read state and perform actions.composerViewModel- The MessageComposerViewModel used to read state and perform actions.
-
MessageDialogs
@Composable() final static Unit MessageDialogs(MessageListViewModel listViewModel)
Contains the message dialogs used to prompt the user with message flagging and deletion actions
- Parameters:
listViewModel- The MessageListViewModel used to read state and perform actions.
-
PollDialogs
@Composable() final static Unit PollDialogs(MessageListViewModel listViewModel, Boolean showAnonymousAvatar)
-
-
-
-