From 2ed79b7d7eaa7afd4b5f594c78228b8b4d3fe4c6 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 2 Jan 2022 09:03:29 +0100 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/FixedTextView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FixedTextView.java b/app/src/main/java/eu/faircode/email/FixedTextView.java index 25423a456b..c7aefbe9da 100644 --- a/app/src/main/java/eu/faircode/email/FixedTextView.java +++ b/app/src/main/java/eu/faircode/email/FixedTextView.java @@ -391,9 +391,11 @@ public class FixedTextView extends AppCompatTextView { if (selected instanceof Spanned) { String html = HtmlHelper.toHtml((Spanned) selected, context); cbm.setPrimaryClip(ClipData.newHtmlText(context.getString(R.string.app_name), selected, html)); - if (getText() instanceof Spannable) + if (getText() instanceof Spannable) { Selection.removeSelection((Spannable) getText()); - return false; + return true; + } else + return false; } } }