From 7603db8ce0acdcf2e5fdf0b3ad68a7f5f957368c Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 5 Feb 2023 18:53:05 +0100 Subject: [PATCH] Missing media description for previews --- .../app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java | 3 +++ src/fdroid/fastlane/metadata/android/en/changelogs/477.txt | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) 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 361f9d92..a8ddf856 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 @@ -2259,6 +2259,9 @@ public class StatusAdapter extends RecyclerView.Adapter if ((!fullAttachement || statusToDeal.sensitive) && !singleImage) { layoutMediaBinding.count.setText(String.format(Locale.getDefault(), "%d/%d", mediaPosition, statusToDeal.media_attachments.size())); } + if (attachment.description != null && attachment.description.trim().length() > 0) { + layoutMediaBinding.media.setContentDescription(attachment.description.trim()); + } String finalUrl; if (attachment.url == null) { finalUrl = attachment.remote_url; diff --git a/src/fdroid/fastlane/metadata/android/en/changelogs/477.txt b/src/fdroid/fastlane/metadata/android/en/changelogs/477.txt index 28949e34..38b3d504 100644 --- a/src/fdroid/fastlane/metadata/android/en/changelogs/477.txt +++ b/src/fdroid/fastlane/metadata/android/en/changelogs/477.txt @@ -9,8 +9,9 @@ Added: Fixed: - Dynamic color for Android 12+ +- Missing media description for previews - Fix a crash when replying - Fix button size not changed - Forward tags in replies - Media cannot be downloaded or shared with Android 10 -- Some crashes +- Some crashes \ No newline at end of file