From a56c14340e3d2d2389e73c786bb743489d511534 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Mon, 4 Nov 2024 19:03:34 +0100 Subject: [PATCH] fix link preview images (#4751) Before (sometimes) vs after: I'm not sure what is going on here, Glide is being weird sometimes and this change fixes it. Regression from https://github.com/tuskyapp/Tusky/pull/4738 --- .../com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index e9d32764ac..49894626e5 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -1190,7 +1190,8 @@ protected void setupCard( if (statusDisplayOptions.useBlurhash() && !TextUtils.isEmpty(card.getBlurhash())) { builder = builder.placeholder(decodeBlurHash(card.getBlurhash())); } - builder.into(cardImage); + builder.centerInside() + .into(cardImage); } else if (statusDisplayOptions.useBlurhash() && !TextUtils.isEmpty(card.getBlurhash())) { int radius = cardImage.getContext().getResources() .getDimensionPixelSize(R.dimen.card_radius);