From f127a5fbfb282fb3e5a125bbe45529f06861def9 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 7 Jan 2025 08:56:54 +0100 Subject: [PATCH] Prevent resource not found --- .../java/eu/faircode/email/AdapterMessage.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 074abc37b5..8ee5d99030 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -8203,12 +8203,16 @@ public class AdapterMessage extends RecyclerView.Adapter 0) + result.add(context.getString(resid)); ibPriority.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); } if (ibSensitivity.getVisibility() == View.VISIBLE) { - result.add(context.getString(getSensitivity(message))); + int resid = getSensitivity(message); + if (resid > 0) + result.add(context.getString(resid)); ibSensitivity.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); } @@ -8243,12 +8247,16 @@ public class AdapterMessage extends RecyclerView.Adapter 0) + result.add(context.getString(R.string.title_legend_signed) + " " + context.getString(resid)); ibSigned.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); } if (ibEncrypted.getVisibility() == View.VISIBLE) { - result.add(context.getString(R.string.title_legend_encrypted) + " " + context.getString(getEncrypted(message))); + int resid = getEncrypted(message); + if (resid > 0) + result.add(context.getString(R.string.title_legend_encrypted) + " " + context.getString(resid)); ibEncrypted.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); }