Only add message count to a11y if it's also visible.

Signed-off-by: Peter Vágner <pvdeejay@gmail.com>
This commit is contained in:
Peter Vágner 2019-12-28 18:10:27 +01:00 committed by M66B
parent c7e8b4edd6
commit ae699b35a2
1 changed files with 3 additions and 2 deletions

View File

@ -3697,8 +3697,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
result.add(context.getString(R.string.title_accessibility_selected));
result.add(context.getString(message.unseen > 0 ? R.string.title_accessibility_unseen : R.string.title_accessibility_seen));
result.add(context.getResources().getQuantityString(
R.plurals.title_accessibility_messages, message.visible, message.visible));
if (tvCount.getVisibility() == View.VISIBLE)
result.add(context.getResources().getQuantityString(
R.plurals.title_accessibility_messages, message.visible, message.visible));
if (ibExpander.getVisibility() == View.VISIBLE) {
result.add(context.getString(expanded ? R.string.title_accessibility_expanded : R.string.title_accessibility_collapsed));