mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Simplification
This commit is contained in:
@@ -4196,8 +4196,14 @@ public class HtmlHelper {
|
||||
if (!(edit instanceof Spannable))
|
||||
return;
|
||||
|
||||
clearComposingText((Spannable) edit);
|
||||
}
|
||||
|
||||
static void clearComposingText(Spannable text) {
|
||||
if (text == null)
|
||||
return;
|
||||
|
||||
// Copied from BaseInputConnection.removeComposingSpans
|
||||
Spannable text = (Spannable) edit;
|
||||
Object[] sps = text.getSpans(0, text.length(), Object.class);
|
||||
if (sps != null) {
|
||||
for (int i = sps.length - 1; i >= 0; i--) {
|
||||
@@ -4214,12 +4220,6 @@ public class HtmlHelper {
|
||||
}
|
||||
}
|
||||
|
||||
static void clearComposingText(Spannable text) {
|
||||
if (text == null)
|
||||
return;
|
||||
BaseInputConnection.removeComposingSpans(text);
|
||||
}
|
||||
|
||||
static Spanned fromHtml(@NonNull String html, Context context) {
|
||||
Document parsed = JsoupEx.parse(html);
|
||||
Document document = sanitizeView(context, parsed, false);
|
||||
|
||||
Reference in New Issue
Block a user