Skip to content

Commit

Permalink
enhancement: improve timeline attachment grid element content scale (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AkesiSeli authored Oct 8, 2024
1 parent 45c812c commit ae052a2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit ae052a2

Please sign in to comment.