@Composable private fun RowScope.FileAttachmentDownloadIcon(attachment: Attachment) {val permissionHandlers = ChatTheme.permissionHandlerProvider Icon( modifier = Modifier.align(Alignment.Top).padding(end = 2.dp).clickable(interactionSource = remember { MutableInteractionSource() },indication = rememberRipple(bounded = false)) {permissionHandlers.first { it.canHandle(Manifest.permission.WRITE_EXTERNAL_STORAGE) }.apply {onHandleRequest(mapOf(PayloadAttachment to attachment))}},painter = painterResource(id = R.drawable.stream_compose_ic_file_download),contentDescription = stringResource(id = R.string.stream_compose_download),tint = ChatTheme.colors.textHighEmphasis)}
Downloads the given attachment when clicked.