Skip to content

Commit

Permalink
remove optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
wildan-m committed Sep 11, 2024
1 parent 1864419 commit feb5cd7
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
public class MarkdownTextWatcher implements TextWatcher {
private final MarkdownUtils mMarkdownUtils;

private boolean mShouldSkip = false;
private String mPreviousText;

public MarkdownTextWatcher(@NonNull MarkdownUtils markdownUtils) {
mMarkdownUtils = markdownUtils;
}
Expand All @@ -29,12 +26,7 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {
@Override
public void afterTextChanged(Editable editable) {
if (editable instanceof SpannableStringBuilder) {
String currentText = editable.toString();
if (currentText.equals(mPreviousText)) {
return;
}
mMarkdownUtils.applyMarkdownFormatting((SpannableStringBuilder) editable);
mPreviousText = currentText;
}
}
}

0 comments on commit feb5cd7

Please sign in to comment.