My File Message Item
fun MyFileMessageItem(message: UikitFileMessage, modifier: Modifier = Modifier, onMessageClick: (UikitFileMessage) -> Unit = {}, onMessageLongClick: (UikitFileMessage) -> Unit = {}, fileBackgroundColor: Color = MaterialTheme.colorScheme.primary, 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.background.copy(alpha = SendbirdOpacity.HighOpacity)
)
})
A Composable to display the current user's UikitFileMessage item other than images or videos using the MyMessageItem.
Since
1.0.0
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.