diff --git a/client/android/div/src/main/java/com/yandex/div/core/view2/divs/DivFocusBinder.kt b/client/android/div/src/main/java/com/yandex/div/core/view2/divs/DivFocusBinder.kt index e0a1ea16e..ad291a9ec 100644 --- a/client/android/div/src/main/java/com/yandex/div/core/view2/divs/DivFocusBinder.kt +++ b/client/android/div/src/main/java/com/yandex/div/core/view2/divs/DivFocusBinder.kt @@ -117,15 +117,15 @@ internal class DivFocusBinder @Inject constructor(private val actionBinder: DivA override fun onFocusChange(v: View, hasFocus: Boolean) { if (hasFocus) { - focusedBorder?.applyToView(v) + applyBorder(v, focusedBorder) focusActions?.handle(v, DivActionBinder.LogType.LOG_FOCUS) } else { - focusedBorder?.let { blurredBorder?.applyToView(v) } + if (focusedBorder != null) applyBorder(v, blurredBorder) blurActions?.handle(v, DivActionBinder.LogType.LOG_BLUR) } } - private fun DivBorder.applyToView(v: View) = v.applyBorder(context, this) + private fun applyBorder(view: View, border: DivBorder?) = view.applyBorder(context, border) private fun List.handle(target: View, actionLogType: String) = actionBinder.handleBulkActions(context, target, this, actionLogType)