Skip to content

Commit

Permalink
fix link preview images (#4751)
Browse files Browse the repository at this point in the history
Before (sometimes) vs after:

<img
src="https://github.com/user-attachments/assets/baeff1b8-c1ea-4102-bb4d-f8b2063d0972"
width="240"/> <img
src="https://github.com/user-attachments/assets/748618d3-4eaf-4428-8a7c-c1314d156f66"
width="240"/>

I'm not sure what is going on here, Glide is being weird sometimes and
this change fixes it.

Regression from #4738
  • Loading branch information
connyduck authored Nov 4, 2024
1 parent 95347c6 commit a56c143
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a56c143

Please sign in to comment.