diff --git a/Podfile b/Podfile index 64c1915dc..a33208ad2 100644 --- a/Podfile +++ b/Podfile @@ -5,8 +5,8 @@ target 'Signal' do pod 'SocketRocket', :git => 'https://github.com/facebook/SocketRocket.git' pod 'AxolotlKit', git: 'https://github.com/WhisperSystems/SignalProtocolKit.git' #pod 'AxolotlKit', path: '../SignalProtocolKit' - pod 'SignalServiceKit', git: 'https://github.com/WhisperSystems/SignalServiceKit.git' - #pod 'SignalServiceKit', path: '../SignalServiceKit' + #pod 'SignalServiceKit', git: 'https://github.com/WhisperSystems/SignalServiceKit.git' + pod 'SignalServiceKit', path: '../SignalServiceKit' pod 'JSQMessagesViewController', git: 'https://github.com/WhisperSystems/JSQMessagesViewController.git', branch: 'mkirk/position-edit-menu' #pod 'JSQMessagesViewController' path: '../JSQMessagesViewController' pod 'PureLayout' diff --git a/Podfile.lock b/Podfile.lock index 6879c1b9d..a26c97191 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -112,7 +112,7 @@ DEPENDENCIES: - JSQMessagesViewController (from `https://github.com/WhisperSystems/JSQMessagesViewController.git`, branch `mkirk/position-edit-menu`) - PureLayout - Reachability - - SignalServiceKit (from `https://github.com/WhisperSystems/SignalServiceKit.git`) + - SignalServiceKit (from `../SignalServiceKit`) - SocketRocket (from `https://github.com/facebook/SocketRocket.git`) EXTERNAL SOURCES: @@ -122,7 +122,7 @@ EXTERNAL SOURCES: :branch: mkirk/position-edit-menu :git: https://github.com/WhisperSystems/JSQMessagesViewController.git SignalServiceKit: - :git: https://github.com/WhisperSystems/SignalServiceKit.git + :path: ../SignalServiceKit SocketRocket: :git: https://github.com/facebook/SocketRocket.git @@ -133,9 +133,6 @@ CHECKOUT OPTIONS: JSQMessagesViewController: :commit: 7054e4b13ee5bcd6d524adb6dc9a726e8c466308 :git: https://github.com/WhisperSystems/JSQMessagesViewController.git - SignalServiceKit: - :commit: f999c4abb50c37cf9c5399f44b89bc98acc8d0a6 - :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf :git: https://github.com/facebook/SocketRocket.git @@ -161,6 +158,6 @@ SPEC CHECKSUMS: UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d YapDatabase: cd911121580ff16675f65ad742a9eb0ab4d9e266 -PODFILE CHECKSUM: 89fd7aee1e2b0ca592ecc9dba0389e57b70f959b +PODFILE CHECKSUM: 6e5d90a9603eb043b395213fd8a29037d2276a8f COCOAPODS: 1.2.1 diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 53bfa97a1..69bec2e1d 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -202,8 +202,7 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; [[TextSecureKitEnv alloc] initWithCallMessageHandler:[Environment getCurrent].callMessageHandler contactsManager:[Environment getCurrent].contactsManager messageSender:[Environment getCurrent].messageSender - notificationsManager:[Environment getCurrent].notificationsManager - preferences:[Environment getCurrent].preferences]; + notificationsManager:[Environment getCurrent].notificationsManager]; [TextSecureKitEnv setSharedEnv:sharedEnv]; [[TSStorageManager sharedManager] setupDatabase]; diff --git a/Signal/src/ViewControllers/PrivacySettingsTableViewController.m b/Signal/src/ViewControllers/PrivacySettingsTableViewController.m index a68243cab..d7f6c2c7b 100644 --- a/Signal/src/ViewControllers/PrivacySettingsTableViewController.m +++ b/Signal/src/ViewControllers/PrivacySettingsTableViewController.m @@ -18,7 +18,6 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) { PrivacySettingsTableViewControllerSectionIndexCalling, PrivacySettingsTableViewControllerSectionIndexCallKit, PrivacySettingsTableViewControllerSectionIndexHistoryLog, - PrivacySettingsTableViewControllerSectionIndexBlockSendingOnIdentityChange, PrivacySettingsTableViewControllerSectionIndex_Count // meta section to track how many sections }; @@ -38,9 +37,6 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) { @property (nonatomic) UITableViewCell *callsHideIPAddressCell; @property (nonatomic) UISwitch *callsHideIPAddressSwitch; -@property (nonatomic, strong) UITableViewCell *sendingIdentityApprovalRequiredCell; -@property (nonatomic, strong) UISwitch *isSendingIdentityApprovalRequiredSwitch; - @property (nonatomic, strong) UITableViewCell *clearHistoryLogCell; @end @@ -115,17 +111,6 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) { self.clearHistoryLogCell = [[UITableViewCell alloc] init]; self.clearHistoryLogCell.textLabel.text = NSLocalizedString(@"SETTINGS_CLEAR_HISTORY", @""); self.clearHistoryLogCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - - // Block Sending on Key Change - self.sendingIdentityApprovalRequiredCell = [UITableViewCell new]; - self.sendingIdentityApprovalRequiredCell.textLabel.text - = NSLocalizedString(@"SETTINGS_BLOCK_SENDING_ON_IDENTITY_CHANGE_TITLE", @"Table cell label"); - self.isSendingIdentityApprovalRequiredSwitch = [[UISwitch alloc] initWithFrame:CGRectZero]; - self.sendingIdentityApprovalRequiredCell.accessoryView = self.isSendingIdentityApprovalRequiredSwitch; - [self.isSendingIdentityApprovalRequiredSwitch setOn:[Environment.preferences isSendingIdentityApprovalRequired]]; - [self.isSendingIdentityApprovalRequiredSwitch addTarget:self - action:@selector(didToggleisSendingIdentityApprovalRequiredSwitch:) - forControlEvents:UIControlEventValueChanged]; } #pragma mark - Table view data source @@ -149,8 +134,6 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) { return [Environment getCurrent].preferences.isCallKitEnabled ? 2 : 1; case PrivacySettingsTableViewControllerSectionIndexHistoryLog: return 1; - case PrivacySettingsTableViewControllerSectionIndexBlockSendingOnIdentityChange: - return 1; default: return 0; } @@ -168,9 +151,6 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) { return ([UIDevice currentDevice].supportsCallKit ? NSLocalizedString(@"SETTINGS_SECTION_CALL_KIT_DESCRIPTION", @"Settings table section footer.") : nil); - case PrivacySettingsTableViewControllerSectionIndexBlockSendingOnIdentityChange: - return NSLocalizedString( - @"SETTINGS_BLOCK_ON_IDENITY_CHANGE_DETAIL", @"User settings section footer, a detailed explanation"); default: return nil; } @@ -193,8 +173,6 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) { } case PrivacySettingsTableViewControllerSectionIndexHistoryLog: return self.clearHistoryLogCell; - case PrivacySettingsTableViewControllerSectionIndexBlockSendingOnIdentityChange: - return self.sendingIdentityApprovalRequiredCell; default: { DDLogError(@"%@ Requested unknown table view cell for row at indexPath: %@", self.tag, indexPath); return [UITableViewCell new]; @@ -211,8 +189,6 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) { return NSLocalizedString(@"SETTINGS_SECTION_TITLE_CALLING", @"settings topic header for table section"); case PrivacySettingsTableViewControllerSectionIndexHistoryLog: return NSLocalizedString(@"SETTINGS_HISTORYLOG_TITLE", @"Section header"); - case PrivacySettingsTableViewControllerSectionIndexBlockSendingOnIdentityChange: - return NSLocalizedString(@"SETTINGS_PRIVACY_VERIFICATION_TITLE", @"Section header"); default: return nil; } @@ -263,13 +239,6 @@ typedef NS_ENUM(NSInteger, PrivacySettingsTableViewControllerSectionIndex) { [Environment.preferences setScreenSecurity:enabled]; } -- (void)didToggleisSendingIdentityApprovalRequiredSwitch:(UISwitch *)sender -{ - BOOL enabled = self.isSendingIdentityApprovalRequiredSwitch.isOn; - DDLogInfo(@"%@ toggled isSendingIdentityApprovalRequired: %@", self.tag, enabled ? @"ON" : @"OFF"); - [Environment.preferences setIsSendingIdentityApprovalRequired:enabled]; -} - - (void)didToggleCallsHideIPAddressSwitch:(UISwitch *)sender { BOOL enabled = sender.isOn; diff --git a/Signal/src/environment/PropertyListPreferences.h b/Signal/src/environment/PropertyListPreferences.h index 30680d1f0..b86521e1d 100644 --- a/Signal/src/environment/PropertyListPreferences.h +++ b/Signal/src/environment/PropertyListPreferences.h @@ -2,8 +2,6 @@ // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // -#import - NS_ASSUME_NONNULL_BEGIN /** @@ -19,7 +17,7 @@ typedef NS_ENUM(NSUInteger, NotificationType) { extern NSString *const PropertyListPreferencesSignalDatabaseCollection; extern NSString *const PropertyListPreferencesKeyEnableDebugLog; -@interface PropertyListPreferences : NSObject +@interface PropertyListPreferences : NSObject #pragma mark - Helpers @@ -82,10 +80,6 @@ extern NSString *const PropertyListPreferencesKeyEnableDebugLog; - (BOOL)doCallsHideIPAddress; - (void)setDoCallsHideIPAddress:(BOOL)flag; -#pragma mark - Block on Identity Change - -- (void)setIsSendingIdentityApprovalRequired:(BOOL)value; - #pragma mark - Push Tokens - (void)setPushToken:(NSString *)value; diff --git a/Signal/src/environment/PropertyListPreferences.m b/Signal/src/environment/PropertyListPreferences.m index ef1d3ffaf..375350727 100644 --- a/Signal/src/environment/PropertyListPreferences.m +++ b/Signal/src/environment/PropertyListPreferences.m @@ -26,7 +26,6 @@ NSString *const PropertyListPreferencesKeyCallKitPrivacyEnabled = @"CallKitPriva NSString *const PropertyListPreferencesKeyCallsHideIPAddress = @"CallsHideIPAddress"; NSString *const PropertyListPreferencesKeyHasDeclinedNoContactsView = @"hasDeclinedNoContactsView"; NSString *const PropertyListPreferencesKeyIOSUpgradeNagVersion = @"iOSUpgradeNagVersion"; -NSString *const PropertyListPreferencesKeyIsSendingIdentityApprovalRequired = @"IsSendingIdentityApprovalRequired"; @implementation PropertyListPreferences @@ -298,23 +297,6 @@ NSString *const PropertyListPreferencesKeyIsSendingIdentityApprovalRequired = @" } } -#pragma mark - Block on Identity Change - -- (BOOL)isSendingIdentityApprovalRequired -{ - NSNumber *preference = [self tryGetValueForKey:PropertyListPreferencesKeyIsSendingIdentityApprovalRequired]; - if (preference) { - return [preference boolValue]; - } else { - return NO; - } -} - -- (void)setIsSendingIdentityApprovalRequired:(BOOL)value -{ - [self setValueForKey:PropertyListPreferencesKeyIsSendingIdentityApprovalRequired toValue:@(value)]; -} - #pragma mark - Push Tokens - (void)setPushToken:(NSString *)value diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 3e5108dd7..c57395072 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -1219,12 +1219,6 @@ /* Label for the block list section of the settings view */ "SETTINGS_BLOCK_LIST_TITLE" = "Blocked"; -/* User settings section footer, a detailed explanation */ -"SETTINGS_BLOCK_ON_IDENITY_CHANGE_DETAIL" = "When a contact's safety number changes, it often means they simply reinstalled Signal. However, you may wish to verify their safety number before responding to ensure privacy."; - -/* Table cell label */ -"SETTINGS_BLOCK_SENDING_ON_IDENTITY_CHANGE_TITLE" = "Responding Requires Approval"; - /* Accessibility hint for the settings button */ "SETTINGS_BUTTON_ACCESSIBILITY" = "Settings"; @@ -1279,9 +1273,6 @@ /* Settings table view cell label */ "SETTINGS_PRIVACY_TITLE" = "Privacy"; -/* Section header */ -"SETTINGS_PRIVACY_VERIFICATION_TITLE" = "When Safety Numbers Change"; - /* No comment provided by engineer. */ "SETTINGS_SCREEN_SECURITY" = "Enable Screen Security";