From 3852d50f925b5ef59a66285d4c4d930d4dbe2bdf Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Wed, 6 Dec 2023 21:26:49 +0100 Subject: [PATCH] Fix 'played' state on TalkBack when cover is hidden (#6796) --- .../view/viewholder/EpisodeItemViewHolder.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java index b4f61a19a..01d4a10f0 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java +++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java @@ -100,15 +100,13 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder { this.item = item; placeholder.setText(item.getFeed().getTitle()); title.setText(item.getTitle()); - leftPadding.setContentDescription(item.getTitle()); + if (item.isPlayed()) { + leftPadding.setContentDescription(item.getTitle() + ". " + activity.getString(R.string.is_played)); + } else { + leftPadding.setContentDescription(item.getTitle()); + } pubDate.setText(DateFormatter.formatAbbrev(activity, item.getPubDate())); pubDate.setContentDescription(DateFormatter.formatForAccessibility(item.getPubDate())); - if (item.isPlayed()) { - cover.setContentDescription(activity.getString(R.string.is_played)); - cover.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES); - } else { - cover.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); - } isInbox.setVisibility(item.isNew() ? View.VISIBLE : View.GONE); isFavorite.setVisibility(item.isTagged(FeedItem.TAG_FAVORITE) ? View.VISIBLE : View.GONE); isInQueue.setVisibility(item.isTagged(FeedItem.TAG_QUEUE) ? View.VISIBLE : View.GONE);