From 8a38353bbd11d79ad31e08872dd6fa956c0e51dd Mon Sep 17 00:00:00 2001 From: Jaehoon You Date: Sun, 17 May 2026 23:00:29 +0900 Subject: [PATCH] fix(TweetsSettingsViewController): Add missing switchChanged: method TweetsSettingsViewController registered switchChanged: as the UIControlEventValueChanged action for every toggle cell but never implemented the method, causing an unrecognized selector crash whenever any toggle in the Tweets settings screen was changed (e.g. 'Save tweet as image'). The method was present in all other section controllers (TwitterBlueSettingsViewController, MediaDownloadsSettingsViewController, ProfilesSettingsViewController, MessagesSettingsViewController) but was accidentally omitted from TweetsSettingsViewController during a prior cleanup refactor that removed the old_style toggle. Assisted-by: Claude Sonnet 4 via Claude Code --- ModernSettingsViewController.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ModernSettingsViewController.m b/ModernSettingsViewController.m index f3944c54..c31c43a0 100644 --- a/ModernSettingsViewController.m +++ b/ModernSettingsViewController.m @@ -1680,6 +1680,13 @@ - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSIntege return UITableViewAutomaticDimension; } +- (void)switchChanged:(UISwitch *)sender { + NSString *key = objc_getAssociatedObject(sender, @"prefKey"); + if (key) { + [[NSUserDefaults standardUserDefaults] setBool:sender.isOn forKey:key]; + } +} + @end // ==============================