Skip to content

Commit 6972ae2

Browse files
committed
feedback: refactor applySelectionHandleTint
1 parent 79f23a7 commit 6972ae2

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

android/src/main/java/com/swmansion/enriched/markdown/utils/text/view/TextSelectionColors.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ fun TextView.applySelectionColors(
2929
private fun TextView.applySelectionHandleTint(
3030
@ColorInt color: Int,
3131
) {
32-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
33-
return
34-
}
32+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) return
3533

3634
val handles: List<Pair<HandleGetter, HandleSetter>> =
3735
listOf(
@@ -44,7 +42,6 @@ private fun TextView.applySelectionHandleTint(
4442
try {
4543
getter(this)?.mutate()?.also { DrawableCompat.setTint(it, color) }?.let { setter(this, it) }
4644
} catch (e: LinkageError) {
47-
// Defensive: OEM TextView variants may strip individual handle accessors.
4845
Log.w(TAG, "Selection handle tint skipped: ${e.message}")
4946
}
5047
}

0 commit comments

Comments
 (0)