story:ONEAPP-6315: selectable update on switch change

This commit is contained in:
vasavk 2024-02-13 22:17:37 +05:30
parent d07c7c47e0
commit c8de65f16f

View File

@ -120,14 +120,8 @@ class ButtonIconViewController: BaseViewController<ButtonIcon> {
selectableSwitch.onChange = { [weak self] sender in selectableSwitch.onChange = { [weak self] sender in
guard let self else { return } guard let self else { return }
if sender.isOn {
self.component.onClick = { _ in
self.component.selectable = !self.component.selectable self.component.selectable = !self.component.selectable
} }
} else {
self.component.onClick = nil
}
}
floating.onChange = { [weak self] sender in floating.onChange = { [weak self] sender in
self?.component.floating = sender.isOn self?.component.floating = sender.isOn