From e11252ab281df5a24b087586f7335eafdcb658a5 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Tue, 18 Aug 2020 12:37:57 +0200 Subject: [PATCH] oops, wrong operator --- .../thoughtcrime/securesms/components/ScaleStableImageView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/components/ScaleStableImageView.java b/src/org/thoughtcrime/securesms/components/ScaleStableImageView.java index 1f2a72901..7655d4130 100644 --- a/src/org/thoughtcrime/securesms/components/ScaleStableImageView.java +++ b/src/org/thoughtcrime/securesms/components/ScaleStableImageView.java @@ -112,7 +112,7 @@ public class ScaleStableImageView large = storedSizes.get(landscapeWidth + "x" + landscapeHeight); if (large == null) return; // no baseline. can't work. Bitmap original = ((BitmapDrawable) large).getBitmap(); - if (height <= original.getHeight() && width <= original.getWidth()) { + if (height <= original.getHeight() || width <= original.getWidth()) { Bitmap cropped = Bitmap.createBitmap(original, 0, 0, width, height); Drawable croppedDrawable = new BitmapDrawable(getResources(), cropped); overrideDrawable(croppedDrawable);