parent
db31454320
commit
2e0c95c379
|
@ -788,7 +788,7 @@
|
|||
<scene sceneID="nF7-wR-ITu">
|
||||
<objects>
|
||||
<navigationController storyboardIdentifier="SettingsNavigationController" id="u7y-N1-6Ba" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="OEe-gh-9Ii">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="OEe-gh-9Ii">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
|
@ -997,29 +997,12 @@
|
|||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="jQa-vx-tCW" style="IBUITableViewCellStyleDefault" id="dmR-bg-mCa" userLabel="Block List">
|
||||
<rect key="frame" x="0.0" y="404" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="dmR-bg-mCa" id="aTF-qk-Ae9">
|
||||
<rect key="frame" x="0.0" y="0.0" width="342" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Block List" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="jQa-vx-tCW" userLabel="Block List">
|
||||
<rect key="frame" x="15" y="0.0" width="325" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection id="FdD-MV-PUQ">
|
||||
<cells>
|
||||
<tableViewCell autoresizesSubviews="NO" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="100" id="R82-FT-SEA" userLabel="Destroy Account Cell">
|
||||
<rect key="frame" x="0.0" y="448" width="375" height="100"/>
|
||||
<rect key="frame" x="0.0" y="404" width="375" height="100"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="R82-FT-SEA" id="Ok9-fE-WhB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="99"/>
|
||||
|
@ -1069,7 +1052,6 @@
|
|||
<connections>
|
||||
<outlet property="aboutLabel" destination="qeN-f1-cIQ" id="kmc-iU-NK5"/>
|
||||
<outlet property="advancedLabel" destination="dkL-Nz-E6H" id="HUw-SB-apQ"/>
|
||||
<outlet property="blockListLabel" destination="jQa-vx-tCW" id="m54-NJ-dpu"/>
|
||||
<outlet property="destroyAccountButton" destination="4Mk-ly-6fq" id="6Xj-Rb-kfF"/>
|
||||
<outlet property="inviteLabel" destination="9FD-M0-WLe" id="TfU-b4-OtN"/>
|
||||
<outlet property="linkedDevicesLabel" destination="hrc-lZ-NeA" id="VkD-E5-2kW"/>
|
||||
|
|
|
@ -3,16 +3,17 @@
|
|||
//
|
||||
|
||||
#import "PrivacySettingsTableViewController.h"
|
||||
|
||||
#import "BlockListViewController.h"
|
||||
#import "Environment.h"
|
||||
#import "PropertyListPreferences.h"
|
||||
#import "UIUtil.h"
|
||||
#import "Signal-Swift.h"
|
||||
#import "UIUtil.h"
|
||||
#import <25519/Curve25519.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) {
|
||||
PrivacySettingsTableViewControllerSectionIndexBlockList,
|
||||
PrivacySettingsTableViewControllerSectionIndexScreenSecurity,
|
||||
PrivacySettingsTableViewControllerSectionIndexCalling,
|
||||
PrivacySettingsTableViewControllerSectionIndexCallKit,
|
||||
|
@ -23,6 +24,8 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) {
|
|||
|
||||
@interface PrivacySettingsTableViewController ()
|
||||
|
||||
@property (nonatomic) UITableViewCell *blocklistCell;
|
||||
|
||||
@property (nonatomic) UITableViewCell *enableCallKitCell;
|
||||
@property (nonatomic) UISwitch *enableCallKitSwitch;
|
||||
|
||||
|
@ -60,6 +63,12 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) {
|
|||
|
||||
self.title = NSLocalizedString(@"SETTINGS_PRIVACY_TITLE", @"");
|
||||
|
||||
// Block List
|
||||
self.blocklistCell = [UITableViewCell new];
|
||||
self.blocklistCell.textLabel.text
|
||||
= NSLocalizedString(@"SETTINGS_BLOCK_LIST_TITLE", @"Label for the block list section of the settings view");
|
||||
self.blocklistCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
|
||||
// CallKit opt-out
|
||||
self.enableCallKitCell = [UITableViewCell new];
|
||||
self.enableCallKitCell.textLabel.text = NSLocalizedString(@"SETTINGS_PRIVACY_CALLKIT_TITLE", @"Short table cell label");
|
||||
|
@ -127,6 +136,8 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) {
|
|||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
switch (section) {
|
||||
case PrivacySettingsTableViewControllerSectionIndexBlockList:
|
||||
return 1;
|
||||
case PrivacySettingsTableViewControllerSectionIndexScreenSecurity:
|
||||
return 1;
|
||||
case PrivacySettingsTableViewControllerSectionIndexCalling:
|
||||
|
@ -167,6 +178,8 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) {
|
|||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
switch (indexPath.section) {
|
||||
case PrivacySettingsTableViewControllerSectionIndexBlockList:
|
||||
return self.blocklistCell;
|
||||
case PrivacySettingsTableViewControllerSectionIndexScreenSecurity:
|
||||
return self.enableScreenSecurityCell;
|
||||
case PrivacySettingsTableViewControllerSectionIndexCalling:
|
||||
|
@ -209,6 +222,13 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) {
|
|||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
||||
switch (indexPath.section) {
|
||||
case PrivacySettingsTableViewControllerSectionIndexBlockList: {
|
||||
BlockListViewController *vc = [[BlockListViewController alloc] init];
|
||||
NSAssert(self.navigationController != nil, @"Navigation controller must not be nil");
|
||||
NSAssert(vc != nil, @"About View Controller must not be nil");
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
break;
|
||||
}
|
||||
case PrivacySettingsTableViewControllerSectionIndexHistoryLog: {
|
||||
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil
|
||||
message:NSLocalizedString(@"SETTINGS_DELETE_HISTORYLOG_CONFIRMATION", @"Alert message before user confirms clearing history")
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
@property (strong, nonatomic) IBOutlet UILabel *linkedDevicesLabel;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *advancedLabel;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *aboutLabel;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *blockListLabel;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *inviteLabel;
|
||||
@property (strong, nonatomic) IBOutlet UIButton *destroyAccountButton;
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#import "PrivacySettingsTableViewController.h"
|
||||
#import "PushManager.h"
|
||||
#import "Signal-Swift.h"
|
||||
#import "BlockListViewController.h"
|
||||
|
||||
#define kProfileCellHeight 87.0f
|
||||
#define kStandardCellHeight 44.0f
|
||||
|
@ -23,16 +22,12 @@
|
|||
#define kNumberOfSections 4
|
||||
|
||||
#define kRegisteredNumberRow 0
|
||||
|
||||
typedef enum {
|
||||
kInviteRow = 0,
|
||||
kPrivacyRow = 1,
|
||||
kNotificationRow = 2,
|
||||
kLinkedDevices = 3, // we don't actually use this, instead we segue via Interface Builder
|
||||
kAdvancedRow = 4,
|
||||
kAboutRow = 5,
|
||||
kBlockListRow = 6,
|
||||
} kGeneralSectionRows;
|
||||
#define kInviteRow 0
|
||||
#define kPrivacyRow 1
|
||||
#define kNotificationRow 2
|
||||
#define kLinkedDevices 3 // we don't actually use this, instead we segue via Interface Builder
|
||||
#define kAdvancedRow 4
|
||||
#define kAboutRow 5
|
||||
|
||||
#define kNetworkRow 0
|
||||
#define kUnregisterRow 0
|
||||
|
@ -40,7 +35,7 @@ typedef enum {
|
|||
typedef enum {
|
||||
kRegisteredRows = 1,
|
||||
kNetworkStatusRows = 1,
|
||||
kGeneralRows = 7,
|
||||
kGeneralRows = 6,
|
||||
kUnregisterRows = 1,
|
||||
} kRowsForSection;
|
||||
|
||||
|
@ -107,8 +102,6 @@ typedef enum {
|
|||
self.linkedDevicesLabel.text
|
||||
= NSLocalizedString(@"LINKED_DEVICES_TITLE", @"Menu item and navbar title for the device manager");
|
||||
self.inviteLabel.text = NSLocalizedString(@"SETTINGS_INVITE_TITLE", @"Settings table view cell label");
|
||||
self.blockListLabel.text
|
||||
= NSLocalizedString(@"SETTINGS_BLOCK_LIST_TITLE", @"Label for the block list section of the settings view");
|
||||
|
||||
[self.destroyAccountButton setTitle:NSLocalizedString(@"SETTINGS_DELETE_ACCOUNT_BUTTON", @"")
|
||||
forState:UIControlStateNormal];
|
||||
|
@ -149,6 +142,7 @@ typedef enum {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
|
||||
|
@ -192,13 +186,6 @@ typedef enum {
|
|||
[self.navigationController pushViewController:vc animated:YES];
|
||||
break;
|
||||
}
|
||||
case kBlockListRow: {
|
||||
BlockListViewController *vc = [[BlockListViewController alloc] init];
|
||||
NSAssert(self.navigationController != nil, @"Navigation controller must not be nil");
|
||||
NSAssert(vc != nil, @"About View Controller must not be nil");
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
DDLogError(@"%@ Unhandled row selected at index path: %@", self.tag, indexPath);
|
||||
break;
|
||||
|
|
|
@ -824,7 +824,7 @@
|
|||
"SETTINGS_BLOCK_LIST_HEADER_TITLE" = "Blocked Phone Numbers";
|
||||
|
||||
/* Label for the block list row of the settings view */
|
||||
"SETTINGS_BLOCK_LIST_TITLE" = "Block List";
|
||||
"SETTINGS_BLOCK_LIST_TITLE" = "Blocked";
|
||||
|
||||
/* User settings section footer, a detailed explanation */
|
||||
"SETTINGS_BLOCK_ON_IDENITY_CHANGE_DETAIL" = "Requires your approval before communicating with someone who has a new safety number, commonly from a reinstall of Signal.";
|
||||
|
|
Loading…
Reference in New Issue