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;
|
||||
}
|
||||
|
||||
if (removed != null) {
|
||||
if (removed != null)
|
||||
try {
|
||||
ParagraphStyle[] ps = text.getSpans(removed, removed + 1, ParagraphStyle.class);
|
||||
if (ps != null)
|
||||
for (ParagraphStyle p : ps) {
|
||||
|
@ -763,11 +764,12 @@ public class FragmentCompose extends FragmentBase {
|
|||
}
|
||||
|
||||
StyleHelper.renumber(text, true, etBody.getContext());
|
||||
|
||||
} finally {
|
||||
removed = null;
|
||||
}
|
||||
|
||||
if (translated != null) {
|
||||
if (translated != null)
|
||||
try {
|
||||
StyleHelper.TranslatedSpan[] spans =
|
||||
text.getSpans(translated, translated, StyleHelper.TranslatedSpan.class);
|
||||
for (StyleHelper.TranslatedSpan span : spans) {
|
||||
|
@ -778,7 +780,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
text.removeSpan(span);
|
||||
}
|
||||
}
|
||||
|
||||
} finally {
|
||||
translated = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue