SearchResultItem
fun SearchResultItem(searchResultItemState: ItemState.SearchResultItemState, currentUser: User?, onSearchResultClick: (Message) -> Unit, modifier: Modifier = Modifier, leadingContent: @Composable RowScope.(ItemState.SearchResultItemState) -> Unit = {
DefaultSearchResultItemLeadingContent(
searchResultItemState = it,
)
}, centerContent: @Composable RowScope.(ItemState.SearchResultItemState) -> Unit = {
DefaultSearchResultItemCenterContent(
searchResultItemState = it,
currentUser = currentUser,
)
}, trailingContent: @Composable RowScope.(ItemState.SearchResultItemState) -> Unit = {
DefaultSearchResultItemTrailingContent(
searchResultItemState = it,
)
})
The basic search result item that show the message and the channel name in a list and expose click actions.
Parameters
searchResultItemState
The state of the search result item.
currentUser
The currently logged in user.
onSearchResultClick
The action to execute when the item is clicked.
modifier
Modifier for styling.
leadingContent
Customizable composable function that represents the leading content of a search result item, usually the avatar that holds an image of the user that sent the message.
centerContent
Customizable composable function that represents the center content of a search result item, usually holding information about the message and who and where it was sent.
trailingContent
Customizable composable function that represents the trailing content of a search result item, usually information about the date where the message was sent.