Small improvement

pull/194/merge
M66B 3 years ago
parent 4fd22ca4d6
commit 6f11c86b56

@ -125,7 +125,7 @@ public class EditTextCompose extends FixedEditText {
String html = HtmlHelper.toHtml((Spanned) selected, context);
cbm.setPrimaryClip(ClipData.newHtmlText(context.getString(R.string.app_name), selected, html));
setSelection(end);
return false;
return true;
}
}
} else if (id == android.R.id.paste) {

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

Loading…
Cancel
Save