From ae052a26f12d59ca5a4266bfa27c1c3dcd934f01 Mon Sep 17 00:00:00 2001 From: akesi seli Date: Tue, 8 Oct 2024 08:17:51 +0200 Subject: [PATCH] enhancement: improve timeline attachment grid element content scale (#308) --- .../core/commonui/content/AttachmentsGrid.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/commonui/content/src/commonMain/kotlin/com/livefast/eattrash/raccoonforfriendica/core/commonui/content/AttachmentsGrid.kt b/core/commonui/content/src/commonMain/kotlin/com/livefast/eattrash/raccoonforfriendica/core/commonui/content/AttachmentsGrid.kt index 3adb8a5f4..2ac08ca85 100644 --- a/core/commonui/content/src/commonMain/kotlin/com/livefast/eattrash/raccoonforfriendica/core/commonui/content/AttachmentsGrid.kt +++ b/core/commonui/content/src/commonMain/kotlin/com/livefast/eattrash/raccoonforfriendica/core/commonui/content/AttachmentsGrid.kt @@ -143,10 +143,10 @@ fun AttachmentsGrid( attachment = attachment, sensitive = blurNsfw && sensitive, contentScale = - if (attachment.aspectRatio >= 1) { - ContentScale.FillHeight - } else { + if (chunkSize == chunk.size) { ContentScale.FillWidth + } else { + ContentScale.Crop }, onClick = { onOpenImage?.invoke( @@ -196,10 +196,10 @@ fun AttachmentsGrid( sensitive = blurNsfw && sensitive, maxHeight = 180.dp, contentScale = - if (attachment.aspectRatio >= 1) { + if (chunkSize == chunk.size) { ContentScale.FillHeight } else { - ContentScale.FillWidth + ContentScale.Crop }, onClick = { onOpenImage?.invoke(