mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
c16d9c0c89
commit
081d0a2d90
|
@ -752,7 +752,8 @@ public class FragmentCompose extends FragmentBase {
|
||||||
added = null;
|
added = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (removed != null) {
|
if (removed != null)
|
||||||
|
try {
|
||||||
ParagraphStyle[] ps = text.getSpans(removed, removed + 1, ParagraphStyle.class);
|
ParagraphStyle[] ps = text.getSpans(removed, removed + 1, ParagraphStyle.class);
|
||||||
if (ps != null)
|
if (ps != null)
|
||||||
for (ParagraphStyle p : ps) {
|
for (ParagraphStyle p : ps) {
|
||||||
|
@ -763,11 +764,12 @@ public class FragmentCompose extends FragmentBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
StyleHelper.renumber(text, true, etBody.getContext());
|
StyleHelper.renumber(text, true, etBody.getContext());
|
||||||
|
} finally {
|
||||||
removed = null;
|
removed = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (translated != null) {
|
if (translated != null)
|
||||||
|
try {
|
||||||
StyleHelper.TranslatedSpan[] spans =
|
StyleHelper.TranslatedSpan[] spans =
|
||||||
text.getSpans(translated, translated, StyleHelper.TranslatedSpan.class);
|
text.getSpans(translated, translated, StyleHelper.TranslatedSpan.class);
|
||||||
for (StyleHelper.TranslatedSpan span : spans) {
|
for (StyleHelper.TranslatedSpan span : spans) {
|
||||||
|
@ -778,7 +780,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
text.removeSpan(span);
|
text.removeSpan(span);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
translated = null;
|
translated = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue