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,11 +752,13 @@ fun ShareImageAction(
) )
} }
mimeType?.let {
if (mimeType.startsWith("image")) {
val context = LocalContext.current val context = LocalContext.current
videoUri?.let { videoUri?.let {
if (videoUri.isNotEmpty()) { if (videoUri.isNotEmpty()) {
DropdownMenuItem( DropdownMenuItem(
text = { Text("Share media...") }, text = { Text("Share image...") },
onClick = { onClick = {
ShareHelper.shareImageFromUrl(context, videoUri) ShareHelper.shareImageFromUrl(context, videoUri)
@@ -767,6 +769,8 @@ fun ShareImageAction(
} }
} }
} }
}
}
private suspend fun verifyHash(content: MediaUrlContent): Boolean? { private suspend fun verifyHash(content: MediaUrlContent): Boolean? {
if (content.hash == null) return null if (content.hash == null) return null