1
0
mirror of https://github.com/tuskyapp/Tusky synced 2025-01-03 12:29:30 +01:00

prefer vertical format for cards with square images

This commit is contained in:
Conny Duck 2024-12-17 20:04:06 +01:00
parent 4b897899ff
commit a38f6ce93f
No known key found for this signature in database

View File

@ -1210,7 +1210,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
int radius = context.getResources().getDimensionPixelSize(R.dimen.inner_card_radius);
ShapeAppearanceModel.Builder cardImageShape = ShapeAppearanceModel.builder();
if (card.getWidth() > card.getHeight()) {
if (card.getWidth() >= card.getHeight()) {
cardLayout.setOrientation(LinearLayout.VERTICAL);
cardImage.getLayoutParams().height = cardImage.getContext().getResources()
.getDimensionPixelSize(R.dimen.card_image_vertical_height);