diff --git a/app/src/main/java/chat/revolt/components/chat/Embed.kt b/app/src/main/java/chat/revolt/components/chat/Embed.kt index 8e250182..0e7d612a 100644 --- a/app/src/main/java/chat/revolt/components/chat/Embed.kt +++ b/app/src/main/java/chat/revolt/components/chat/Embed.kt @@ -125,7 +125,9 @@ fun RegularEmbed( } ) .aspectRatio( - (it.width?.toFloat() ?: 0f) / (it.height?.toFloat() ?: 0f) + ((it.width?.toFloat() ?: 0f) / (it.height?.toFloat() ?: 0f)).let { + if (it.isNaN()) 1f else it + } ), contentScale = ContentScale.Crop, description = null // decorative