mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-10 23:24:35 +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 hash = event.hash()
|
||||||
val dimensions = event.dimensions()
|
val dimensions = event.dimensions()
|
||||||
val description = event.content.ifEmpty { null } ?: event.alt()
|
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()
|
val uri = note.toNostrUri()
|
||||||
|
|
||||||
mutableStateOf<BaseMediaContent>(
|
mutableStateOf<BaseMediaContent>(
|
||||||
|
@@ -85,7 +85,7 @@ fun VideoDisplay(
|
|||||||
val hash = event.hash()
|
val hash = event.hash()
|
||||||
val dimensions = event.dimensions()
|
val dimensions = event.dimensions()
|
||||||
val description = event.content.ifBlank { null } ?: event.alt()
|
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()
|
val uri = note.toNostrUri()
|
||||||
|
|
||||||
mutableStateOf<BaseMediaContent>(
|
mutableStateOf<BaseMediaContent>(
|
||||||
|
Reference in New Issue
Block a user