Small improvement

This commit is contained in:
M66B
2022-01-02 15:44:33 +01:00
parent 4fd22ca4d6
commit 6f11c86b56
2 changed files with 4 additions and 6 deletions

View File

@@ -392,11 +392,9 @@ 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) {
Selection.removeSelection((Spannable) getText());
return true;
} else
return false;
if (getText() instanceof Spannable)
Selection.setSelection((Spannable) getText(), end);
return true;
}
}
}