Skip to content

Commit

Permalink
Update android/src/main/java/com/expensify/livemarkdown/MarkdownTextW…
Browse files Browse the repository at this point in the history
…atcher.java

Co-authored-by: Tomek Zawadzki <[email protected]>
  • Loading branch information
wildan-m and tomekzaw authored Sep 11, 2024
1 parent ade58bc commit 88baac1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

0 comments on commit 88baac1

Please sign in to comment.