From cd3289565722cba61468b20c14096507bde89cf5 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 21 Feb 2018 20:20:38 -0500 Subject: [PATCH] Add UI for editing per-thread notification sounds. --- .../OWSConversationSettingsViewController.m | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Signal/src/ViewControllers/OWSConversationSettingsViewController.m b/Signal/src/ViewControllers/OWSConversationSettingsViewController.m index 0d57cd748..5b0326b2e 100644 --- a/Signal/src/ViewControllers/OWSConversationSettingsViewController.m +++ b/Signal/src/ViewControllers/OWSConversationSettingsViewController.m @@ -439,24 +439,6 @@ NS_ASSUME_NONNULL_BEGIN [contents addSection:mainSection]; - // Notifications section. - - OWSTableSection *notificationsSection = [OWSTableSection new]; - notificationsSection.headerTitle = NSLocalizedString(@"CONVERSATION_SETTINGS_NOTIFICATIONS_SECTION", - @"Label for notifications section of conversation settings view."); - [notificationsSection - addItem:[OWSTableItem disclosureItemWithText: - NSLocalizedString(@"NOTIFICATIONS_ITEM_SOUND", - @"Label for settings view that allows user to change the notification sound.") - actionBlock:^{ - NotificationSoundsViewController *vc = - [NotificationSoundsViewController new]; - vc.thread = weakSelf.thread; - [weakSelf.navigationController pushViewController:vc animated:YES]; - }]]; - - [contents addSection:notificationsSection]; - // Group settings section. if (self.isGroupThread) { @@ -585,6 +567,24 @@ NS_ASSUME_NONNULL_BEGIN [contents addSection:section]; } + // Notifications section. + + OWSTableSection *notificationsSection = [OWSTableSection new]; + notificationsSection.headerTitle = NSLocalizedString(@"CONVERSATION_SETTINGS_NOTIFICATIONS_SECTION", + @"Label for notifications section of conversation settings view."); + [notificationsSection + addItem:[OWSTableItem disclosureItemWithText: + NSLocalizedString(@"NOTIFICATIONS_ITEM_SOUND", + @"Label for settings view that allows user to change the notification sound.") + actionBlock:^{ + NotificationSoundsViewController *vc = + [NotificationSoundsViewController new]; + vc.thread = weakSelf.thread; + [weakSelf.navigationController pushViewController:vc animated:YES]; + }]]; + + [contents addSection:notificationsSection]; + self.contents = contents; }