Skip to content

Commit c67f638

Browse files
committed
fix small bug related to FUISwitch toggling
1 parent cdd890a commit c67f638

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Classes/ios/FUISwitch.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,8 @@ - (void) setOn:(BOOL)on {
104104
}
105105

106106
- (void)setOn:(BOOL)on animated:(BOOL)animated {
107-
BOOL valueChanged = _on != on;
108-
_on = on;
109-
if (valueChanged) {
107+
if (_on != on) {
108+
_on = on;
110109
[self sendActionsForControlEvents:UIControlEventValueChanged];
111110
}
112111
[self setPercentOn:_on * 1.0f animated:animated];

0 commit comments

Comments
 (0)