refactor: change disabling propagation condition

This commit is contained in:
b0sya 2021-03-16 16:11:02 +03:00
parent 3e64b5cc4e
commit 8655c90f1d
1 changed files with 2 additions and 2 deletions

View File

@ -141,9 +141,9 @@ open class StatefulButton: UIButton {
let touchEventReceiver = super.hitTest(point, with: event)
let shouldPropagateEvent = eventPropagations[state] ?? true
let shouldPropagateEvent = (eventPropagations[state] ?? true) || isHidden
if pointInsideView && touchEventReceiver == nil && !shouldPropagateEvent && !isHidden {
if pointInsideView && touchEventReceiver == nil && !shouldPropagateEvent {
return self // disable propagation
}