mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
aabf656d89
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
56 lines
2.2 KiB
Objective-C
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
|