Skip to content

Commit

Permalink
Use pattern matching for instanceof in afterTextChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Dec 7, 2024
1 parent 5695408 commit 8c62d90
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 8c62d90

Please sign in to comment.