Add test to only share images. Other media not supported atm
This commit is contained in:
+5
-1
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user