mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-04 06:20:26 +00:00
prevent crash
This commit is contained in:
parent
412e726fda
commit
9bea64fe7a
1 changed files with 10 additions and 6 deletions
|
@ -522,13 +522,17 @@ public class FragmentCompose extends FragmentBase {
|
||||||
int f = ssb.getSpanFlags(span);
|
int f = ssb.getSpanFlags(span);
|
||||||
Log.i("Style span " + s + "..." + e + " start=" + start);
|
Log.i("Style span " + s + "..." + e + " start=" + start);
|
||||||
|
|
||||||
CharacterStyle s1 = CharacterStyle.wrap(span);
|
if (s <= start) {
|
||||||
ssb.setSpan(s1, s, start, f);
|
CharacterStyle s1 = CharacterStyle.wrap(span);
|
||||||
Log.i("Style span " + s + "..." + start);
|
ssb.setSpan(s1, s, start, f);
|
||||||
|
Log.i("Style span " + s + "..." + start);
|
||||||
|
}
|
||||||
|
|
||||||
CharacterStyle s2 = CharacterStyle.wrap(span);
|
if (start + 1 <= e) {
|
||||||
ssb.setSpan(s2, start + 1, e, f);
|
CharacterStyle s2 = CharacterStyle.wrap(span);
|
||||||
Log.i("Style span " + (start + 1) + "..." + e);
|
ssb.setSpan(s2, start + 1, e, f);
|
||||||
|
Log.i("Style span " + (start + 1) + "..." + e);
|
||||||
|
}
|
||||||
|
|
||||||
ssb.removeSpan(span);
|
ssb.removeSpan(span);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue