Skip to content

refactor(android): guard selection color setters against no-op writes#268

Merged
hryhoriiK97 merged 1 commit intomainfrom
perf/android-selection-color-equality-guards
Apr 25, 2026
Merged

refactor(android): guard selection color setters against no-op writes#268
hryhoriiK97 merged 1 commit intomainfrom
perf/android-selection-color-equality-guards

Conversation

@hryhoriiK97
Copy link
Copy Markdown
Collaborator

What/Why?

Adds if (field == newValue) return guards to setSelectionColor / setSelectionHandleColor in EnrichedMarkdown.kt and EnrichedMarkdownText.kt to match the pattern already used by every other setter in those files (setMd4cFlags, setAllowFontScaling, etc.) and skip a redundant handle-drawable re-tint when the color hasn't changed.

Testing

PR Checklist

  • Code compiles and runs on iOS
  • Code compiles and runs on Android
  • Updated documentation/README if applicable
  • Ran example app to verify changes

@hryhoriiK97 hryhoriiK97 merged commit 2e99a4a into main Apr 25, 2026
5 checks passed
@hryhoriiK97 hryhoriiK97 deleted the perf/android-selection-color-equality-guards branch April 25, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant