summaryrefslogtreecommitdiffstats
path: root/app/src/main/java/app/fedilab/android/mastodon/helper/MediaHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/app/fedilab/android/mastodon/helper/MediaHelper.java')
-rw-r--r--app/src/main/java/app/fedilab/android/mastodon/helper/MediaHelper.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/MediaHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/MediaHelper.java
index b1dbee3cf..4acca2b57 100644
--- a/app/src/main/java/app/fedilab/android/mastodon/helper/MediaHelper.java
+++ b/app/src/main/java/app/fedilab/android/mastodon/helper/MediaHelper.java
@@ -390,8 +390,8 @@ public class MediaHelper {
int maxHeight = RelativeLayout.LayoutParams.WRAP_CONTENT;
if (attachmentList != null && attachmentList.size() > 0) {
for (Attachment attachment : attachmentList) {
- if (attachment.meta != null && attachment.meta.small != null && attachment.meta.small.height > maxHeight) {
- maxHeight = (int) Helper.convertDpToPixel(attachment.meta.small.height, context);
+ if (attachment.meta != null && attachment.meta.getSmall() != null && attachment.meta.getSmall().height > maxHeight) {
+ maxHeight = (int) Helper.convertDpToPixel(attachment.meta.getSmall().height, context);
}
}
}