Skip to content

Commit

Permalink
Use pattern matching for instanceof in afterTextChanged (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw authored Dec 9, 2024
1 parent 5695408 commit 3822c88
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {

@Override
public void afterTextChanged(Editable editable) {
if (editable instanceof SpannableStringBuilder) {
mMarkdownUtils.applyMarkdownFormatting((SpannableStringBuilder) editable);
if (editable instanceof SpannableStringBuilder ssb) {
mMarkdownUtils.applyMarkdownFormatting(ssb);
}
}
}

0 comments on commit 3822c88

Please sign in to comment.