From b5f0cc3097f8546e07427df93b1beadf21db5f7f Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 9 Mar 2023 16:42:12 +0100 Subject: [PATCH] Fix issue #824 --- .../app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java | 3 ++- src/fdroid/fastlane/metadata/android/en/changelogs/484.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java index 70f70c62..48c73f29 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java @@ -1471,7 +1471,8 @@ public class StatusAdapter extends RecyclerView.Adapter boolean autoplaygif = sharedpreferences.getBoolean(context.getString(R.string.SET_AUTO_PLAY_GIG_MEDIA), true); if (!fullAttachement || statusToDeal.sensitive) { int defaultHeight = (int) Helper.convertDpToPixel(300, context); - if (measuredWidth > 0) { + int orientation = context.getResources().getConfiguration().orientation; + if (orientation == Configuration.ORIENTATION_PORTRAIT && measuredWidth > 0) { defaultHeight = (int) (measuredWidth * 3) / 4; } LinearLayoutCompat.LayoutParams lp = new LinearLayoutCompat.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, defaultHeight); diff --git a/src/fdroid/fastlane/metadata/android/en/changelogs/484.txt b/src/fdroid/fastlane/metadata/android/en/changelogs/484.txt index 3511a737..a2852f84 100644 --- a/src/fdroid/fastlane/metadata/android/en/changelogs/484.txt +++ b/src/fdroid/fastlane/metadata/android/en/changelogs/484.txt @@ -8,4 +8,5 @@ Changed: Fixed: - Some settings not properly restored (multiple choices) -- Cancel a follow request \ No newline at end of file +- Cancel a follow request +- Media with a lot of height in landscape \ No newline at end of file