mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 18:16:43 +02:00
Improving the detection of image types on the Media Feed.
This commit is contained in:
@@ -50,7 +50,7 @@ fun FileHeaderDisplay(
|
||||
val hash = event.hash()
|
||||
val dimensions = event.dimensions()
|
||||
val description = event.content.ifEmpty { null } ?: event.alt()
|
||||
val isImage = RichTextParser.isImageUrl(fullUrl)
|
||||
val isImage = event.mimeType()?.startsWith("image/") == true || RichTextParser.isImageUrl(fullUrl)
|
||||
val uri = note.toNostrUri()
|
||||
|
||||
mutableStateOf<BaseMediaContent>(
|
||||
|
@@ -85,7 +85,7 @@ fun VideoDisplay(
|
||||
val hash = event.hash()
|
||||
val dimensions = event.dimensions()
|
||||
val description = event.content.ifBlank { null } ?: event.alt()
|
||||
val isImage = RichTextParser.isImageUrl(fullUrl)
|
||||
val isImage = event.mimeType()?.startsWith("image/") == true || RichTextParser.isImageUrl(fullUrl)
|
||||
val uri = note.toNostrUri()
|
||||
|
||||
mutableStateOf<BaseMediaContent>(
|
||||
|
Reference in New Issue
Block a user