From 72d72d443e9644dc603d501254e27cc8029acf7a Mon Sep 17 00:00:00 2001 From: Grishka Date: Thu, 30 Mar 2023 18:53:59 +0300 Subject: [PATCH] Limit aspect ratio to 9:20 --- .../java/org/joinmastodon/android/ui/PhotoLayoutHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/PhotoLayoutHelper.java b/mastodon/src/main/java/org/joinmastodon/android/ui/PhotoLayoutHelper.java index 6ca082e3c..93bf60a53 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/PhotoLayoutHelper.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/PhotoLayoutHelper.java @@ -44,7 +44,7 @@ public class PhotoLayoutHelper{ boolean allAreWide=true, allAreSquare=true; for(Attachment thumb : thumbs){ - float ratio=thumb.getWidth()/(float) thumb.getHeight(); + float ratio=Math.max(0.45f, thumb.getWidth()/(float) thumb.getHeight()); if(ratio<=1.2f){ allAreWide=false; if(ratio<0.8f)