diff --git a/android/src/main/java/com/expensify/livemarkdown/MarkdownTextWatcher.java b/android/src/main/java/com/expensify/livemarkdown/MarkdownTextWatcher.java index 2343a795..787aef50 100644 --- a/android/src/main/java/com/expensify/livemarkdown/MarkdownTextWatcher.java +++ b/android/src/main/java/com/expensify/livemarkdown/MarkdownTextWatcher.java @@ -28,12 +28,12 @@ public void onTextChanged(CharSequence s, int start, int before, int count) { @Override public void afterTextChanged(Editable editable) { if (editable instanceof SpannableStringBuilder) { - String currentEditable = editable.toString(); - if (mPreviousEditable != null && mPreviousEditable.equals(currentEditable)) { + String currentText = editable.toString(); + if (currentText.equals(mPreviousText)) { return; } mMarkdownUtils.applyMarkdownFormatting((SpannableStringBuilder) editable); - mPreviousEditable = currentEditable; + mPreviousText = currentText; } } } \ No newline at end of file