File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
aztec/src/main/kotlin/org/wordpress/aztec/watchers Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,14 @@ class TextDeleter private constructor(aztecText: AztecText) : TextWatcher {
2121 return
2222 }
2323
24- aztecTextRef.get()?. text?. let { text ->
25- text.getSpans( 0 , text.length, MarkForDeletion :: class .java).forEach {
26- val start = text.getSpanStart (it)
27- val end = text.getSpanEnd(it)
28-
29- if (start > - 1 && end > - 1 ) {
30- text.delete(text.getSpanStart(it), text.getSpanEnd(it) )
31- }
24+ text.getSpans( 0 , text.length, MarkForDeletion :: class .java).forEach {
25+ val start = text.getSpanStart(it)
26+ val end = text.getSpanEnd (it)
27+
28+ if (start > - 1 && end > - 1 ) {
29+ aztecTextRef.get()?.disableTextChangedListener()
30+ text.delete(start, end )
31+ aztecTextRef.get()?.enableTextChangedListener()
3232 }
3333 }
3434 }
You can’t perform that action at this time.
0 commit comments