Add UI for editing per-thread notification sounds.

This commit is contained in:
Matthew Chen 2018-02-21 20:20:38 -05:00
parent 396fe82707
commit cd32895657
1 changed files with 18 additions and 18 deletions

View File

@ -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;
}