session-ios/Session/Settings/NotificationSettingsOptionsViewController.m
Morgan Pretty aabf656d89 Finished off the MediaGallery logic
Updated the config message generation for GRDB
Migrated more preferences into GRDB
Added paging to the MediaTileViewController and sorted out the various animations/transitions
Fixed an issue where the 'recipientState' for the 'baseQuery' on the ConversationCell.ViewModel wasn't grouping correctly
Fixed an issue where the MediaZoomAnimationController could fail if the contextual info wasn't available
Fixed an issue where the MediaZoomAnimationController bounce looked odd when returning to the detail screen from the tile screen
Fixed an issue where the MediaZoomAnimationController didn't work for videos
Fixed a bug where the YDB to GRDB migration wasn't properly handling video files
Fixed a number of minor UI bugs with the GalleryRailView
Deleted a bunch of legacy code
2022-05-20 17:58:39 +10:00

56 lines
2.2 KiB
Objective-C

//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import "NotificationSettingsOptionsViewController.h"
#import "Session-Swift.h"
#import <SignalUtilitiesKit/SignalUtilitiesKit-Swift.h>
@implementation NotificationSettingsOptionsViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[self updateTableContents];
[LKViewControllerUtilities setUpDefaultSessionStyleForVC:self withTitle:NSLocalizedString(@"Content", @"") customBackButton:NO];
self.tableView.backgroundColor = UIColor.clearColor;
}
#pragma mark - Table Contents
- (void)updateTableContents
{
OWSTableContents *contents = [OWSTableContents new];
__weak NotificationSettingsOptionsViewController *weakSelf = self;
OWSTableSection *section = [OWSTableSection new];
// section.footerTitle = NSLocalizedString(@"NOTIFICATIONS_FOOTER_WARNING", nil);
NSInteger selectedNotifType = [SMKPreferences notificationPreviewType];
for (NSNumber *option in [SMKPreferences notificationTypes]) {
[section addItem:[OWSTableItem
itemWithCustomCellBlock:^{
UITableViewCell *cell = [OWSTableItem newCell];
cell.tintColor = LKColors.accent;
[[cell textLabel] setText:[SMKPreferences nameForNotificationPreviewType:option.intValue]];
if (selectedNotifType == option.intValue) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
cell.accessibilityIdentifier = ACCESSIBILITY_IDENTIFIER_WITH_NAME(NotificationSettingsOptionsViewController, [SMKPreferences accessibilityIdentifierForNotificationPreviewType:option.intValue]);
return cell;
}
actionBlock:^{
[SMKPreferences setNotificationPreviewType: option.intValue];
[weakSelf.navigationController popViewControllerAnimated:YES];
}]];
}
[contents addSection:section];
self.contents = contents;
}
@end