1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-31 11:31:40 +00:00

Prevent crash

This commit is contained in:
M66B 2022-01-02 09:03:29 +01:00
parent 9b4c49099b
commit 2ed79b7d7e

View file

@ -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;
}
}
}