Other File Message Item
fun OtherFileMessageItem(message: UikitFileMessage, modifier: Modifier = Modifier, onMessageClick: (UikitFileMessage) -> Unit = {}, onMessageLongClick: (UikitFileMessage) -> Unit = {}, fileBackgroundColor: Color = if (SendbirdUikitCompose.isDarkTheme) {
MaterialTheme.colorScheme.surfaceContainerHighest
} else {
MaterialTheme.colorScheme.surfaceBright
}, messageGroupingPosition: MessageGroupingPosition = MessageGroupingPosition.Single, fileIcon: @Composable () -> Unit = {
Icon(
painter = message.fileIcon(),
contentDescription = null,
modifier = Modifier
.size(28.dp)
.clip(MaterialTheme.shapes.small),
tint = Color.Unspecified
)
}, fileName: @Composable () -> Unit = {
Text(
text = message.fileName(),
modifier = Modifier,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onBackground
)
})
A Composable to display the other user's UikitFileMessage item other than images or videos using the OtherMessageItem.
Since
1.0.0-beta.1
Parameters
message
The UikitFileMessage to display.
modifier
The modifier to be applied to the view.
on Message Click
The handler for when the message is clicked.
on Message Long Click
The handler for when the message is long clicked.
file Background Color
The background color of the file message.
message Grouping Position
The position of the message in the message group.
file Icon
The Composable to display the file icon.
file Name
The Composable to display the file name.