diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index baeff1269..d1e1f163d 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -1995,7 +1995,7 @@ TableViewSectionsDelegate> labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; labelAndSwitchCell.mxkSwitch.enabled = YES; - [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableURLPreviews:) forControlEvents:UIControlEventValueChanged]; + [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableURLPreviews:) forControlEvents:UIControlEventTouchUpInside]; cell = labelAndSwitchCell; } @@ -2440,7 +2440,7 @@ TableViewSectionsDelegate> labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableRingingForGroupCalls; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; - [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableRingingForGroupCalls:) forControlEvents:UIControlEventValueChanged]; + [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableRingingForGroupCalls:) forControlEvents:UIControlEventTouchUpInside]; cell = labelAndSwitchCell; } @@ -2452,7 +2452,7 @@ TableViewSectionsDelegate> labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableThreads; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; - [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableThreads:) forControlEvents:UIControlEventValueChanged]; + [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableThreads:) forControlEvents:UIControlEventTouchUpInside]; cell = labelAndSwitchCell; } diff --git a/changelog.d/5463.bugfix b/changelog.d/5463.bugfix new file mode 100644 index 000000000..35ed277e6 --- /dev/null +++ b/changelog.d/5463.bugfix @@ -0,0 +1 @@ +Settings: Fix a bug where tapping a toggle could change multiple settings. \ No newline at end of file