ChannelFilesAttachmentsScreen

fun ChannelFilesAttachmentsScreen(viewModelFactory: ChannelAttachmentsViewModelFactory, modifier: Modifier = Modifier, currentUser: User? = ChatClient.instance().getCurrentUser(), stickHeader: Boolean = true, headerKeySelector: (item: ChannelAttachmentsViewState.Content.Item) -> String = ChannelAttachmentsDefaults.HeaderKeySelector, onNavigationIconClick: () -> Unit = {})

Displays the channel files attachments screen.

The screen includes a top bar, a list of file attachments, and handles attachments click events with ChatTheme.attachmentPreviewHandlers. The screen supports loading more attachments when the user scrolls to the end of the list. It also supports grouping attachments by a header key, which can be customized using the headerKeySelector function.

Parameters

viewModelFactory

The factory to create the ChannelAttachmentsViewModel.

modifier

The modifier for styling.

currentUser

The currently logged in user.

stickHeader

Whether the header should stick to the top of the list when scrolling.

headerKeySelector

The function to select the group key for each item and group them in the list.

onNavigationIconClick

The callback to be invoked when the navigation icon is clicked.