Debug: inserted spans

This commit is contained in:
M66B 2024-05-23 14:06:47 +02:00
parent 04730c7d1a
commit 32eb7c96f4
1 changed files with 3 additions and 2 deletions

View File

@ -318,7 +318,6 @@ public class StyleHelper {
if (renum)
StyleHelper.renumber(text, false, etBody.getContext());
if (BuildConfig.DEBUG)
StyleHelper.markAsInserted(text, -1, -1);
} catch (Throwable ex) {
Log.e(ex);
@ -1767,6 +1766,8 @@ public class StyleHelper {
}
static void markAsInserted(Editable text, int start, int end) {
if (!BuildConfig.DEBUG)
return;
for (InsertedSpan span : text.getSpans(0, text.length(), InsertedSpan.class))
text.removeSpan(span);
if (start >= 0 && start < end && end <= text.length()) {