Add test to only share images. Other media not supported atm

This commit is contained in:
David Kaspar
2025-05-12 17:13:29 +02:00
parent fee85a6111
commit 0192a4eb20
@@ -752,17 +752,21 @@ fun ShareImageAction(
) )
} }
val context = LocalContext.current mimeType?.let {
videoUri?.let { if (mimeType.startsWith("image")) {
if (videoUri.isNotEmpty()) { val context = LocalContext.current
DropdownMenuItem( videoUri?.let {
text = { Text("Share media...") }, if (videoUri.isNotEmpty()) {
onClick = { DropdownMenuItem(
ShareHelper.shareImageFromUrl(context, videoUri) text = { Text("Share image...") },
onClick = {
ShareHelper.shareImageFromUrl(context, videoUri)
onDismiss() onDismiss()
}, },
) )
}
}
} }
} }
} }