From b0005ea932870c730c07627d1d801b675c7ac89b Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 23 May 2017 09:33:31 -0400 Subject: [PATCH] Respond to CR. // FREEBIE --- Podfile | 5 +++-- Podfile.lock | 12 +++++++++--- .../AdvancedSettingsTableViewController.m | 4 ++++ .../DomainFrontingCountryViewController.m | 4 ++-- Signal/translations/en.lproj/Localizable.strings | 15 +++++++++------ 5 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Podfile b/Podfile index 827294851..55d7dcd08 100644 --- a/Podfile +++ b/Podfile @@ -5,12 +5,13 @@ 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 'OpenSSL' pod 'JSQMessagesViewController', git: 'https://github.com/WhisperSystems/JSQMessagesViewController.git', branch: 'mkirk/position-edit-menu' #pod 'JSQMessagesViewController' path: '../JSQMessagesViewController' pod 'PureLayout' + pod 'Reachability' target 'SignalTests' do inherit! :search_paths end diff --git a/Podfile.lock b/Podfile.lock index 284539e24..69b90c753 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -39,6 +39,7 @@ PODS: - OpenSSL (1.0.210) - ProtocolBuffers (1.9.11) - PureLayout (3.0.2) + - Reachability (3.2) - SAMKeychain (1.5.2) - SignalServiceKit (0.9.0): - '25519' @@ -112,7 +113,8 @@ DEPENDENCIES: - JSQMessagesViewController (from `https://github.com/WhisperSystems/JSQMessagesViewController.git`, branch `mkirk/position-edit-menu`) - OpenSSL - PureLayout - - SignalServiceKit (from `../SignalServiceKit`) + - Reachability + - SignalServiceKit (from `https://github.com/WhisperSystems/SignalServiceKit.git`) - SocketRocket (from `https://github.com/facebook/SocketRocket.git`) EXTERNAL SOURCES: @@ -122,7 +124,7 @@ EXTERNAL SOURCES: :branch: mkirk/position-edit-menu :git: https://github.com/WhisperSystems/JSQMessagesViewController.git SignalServiceKit: - :path: ../SignalServiceKit + :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :git: https://github.com/facebook/SocketRocket.git @@ -133,6 +135,9 @@ CHECKOUT OPTIONS: JSQMessagesViewController: :commit: 7054e4b13ee5bcd6d524adb6dc9a726e8c466308 :git: https://github.com/WhisperSystems/JSQMessagesViewController.git + SignalServiceKit: + :commit: d61235825680e9b563f28cbbbaf6772c19f85674 + :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf :git: https://github.com/facebook/SocketRocket.git @@ -150,6 +155,7 @@ SPEC CHECKSUMS: OpenSSL: 246ffb948e9d56466727fd318134af35f5aa764e ProtocolBuffers: d509225eb2ea43d9582a59e94348fcf86e2abd65 PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd + Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 SAMKeychain: 1865333198217411f35327e8da61b43de79b635b SignalServiceKit: 2ad8d86da055e24ac3ea0354ec1d4b13251af28f SocketRocket: dbb1554b8fc288ef8ef370d6285aeca7361be31e @@ -158,6 +164,6 @@ SPEC CHECKSUMS: UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d YapDatabase: cd911121580ff16675f65ad742a9eb0ab4d9e266 -PODFILE CHECKSUM: 7664b398319c44d566a6da1acaecfc658742f18f +PODFILE CHECKSUM: 48e80d7f1e049bbf544a689fdfdf33e8196c640a COCOAPODS: 1.2.1 diff --git a/Signal/src/ViewControllers/AdvancedSettingsTableViewController.m b/Signal/src/ViewControllers/AdvancedSettingsTableViewController.m index a7a4db3e0..a120ebe06 100644 --- a/Signal/src/ViewControllers/AdvancedSettingsTableViewController.m +++ b/Signal/src/ViewControllers/AdvancedSettingsTableViewController.m @@ -237,6 +237,8 @@ NS_ASSUME_NONNULL_BEGIN - (OWSCountryMetadata *)ensureManualCensorshipCircumventionCountry { + OWSAssert([NSThread isMainThread]); + OWSCountryMetadata *countryMetadata = nil; NSString *countryCode = OWSSignalService.sharedInstance.manualCensorshipCircumventionCountryCode; if (countryCode) { @@ -294,6 +296,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)didToggleEnableCensorshipCircumventionSwitch:(UISwitch *)sender { OWSSignalService.sharedInstance.isCensorshipCircumventionManuallyActivated = sender.isOn; + + [self updateTableContents]; } #pragma mark - Logging diff --git a/Signal/src/ViewControllers/DomainFrontingCountryViewController.m b/Signal/src/ViewControllers/DomainFrontingCountryViewController.m index 3ed7b37d3..1b1717885 100644 --- a/Signal/src/ViewControllers/DomainFrontingCountryViewController.m +++ b/Signal/src/ViewControllers/DomainFrontingCountryViewController.m @@ -27,8 +27,8 @@ NS_ASSUME_NONNULL_BEGIN { [super loadView]; - self.title - = NSLocalizedString(@"DOMAIN_FRONTING_COUNTRY_VIEW_TITLE", @"Title for the 'domain fronting country' view."); + self.title = NSLocalizedString( + @"CENSORSHIP_CIRCUMVENTION_COUNTRY_VIEW_TITLE", @"Title for the 'censorship circumvention country' view."); self.view.backgroundColor = [UIColor whiteColor]; [self.navigationController.navigationBar setTranslucent:NO]; diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index abb7aa7d2..65a15d39c 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -16,7 +16,7 @@ /* Title for the 'add group member' view. */ "ADD_GROUP_MEMBER_VIEW_TITLE" = "Add Member"; -/* No comment provided by engineer. */ +/* Message shown in conversation view that offers to add an unknown user to your phone's contacts. */ "ADD_TO_CONTACTS_OFFER" = "Would you like to add this user to your contacts?"; /* The label for the 'discard' button in alerts and action sheets. */ @@ -217,6 +217,9 @@ /* The generic name used for calls if CallKit privacy is enabled */ "CALLKIT_ANONYMOUS_CONTACT_NAME" = "Signal User"; +/* Title for the 'censorship circumvention country' view. */ +"CENSORSHIP_CIRCUMVENTION_COUNTRY_VIEW_TITLE" = "Select Country"; + /* Activity Sheet label */ "COMPARE_SAFETY_NUMBER_ACTION" = "Compare with Clipboard"; @@ -334,9 +337,6 @@ /* Section title for the 'domain fronting country' view. */ "DOMAIN_FRONTING_COUNTRY_VIEW_SECTION_HEADER" = "Censorship Circumvention Location"; -/* Title for the 'domain fronting country' view. */ -"DOMAIN_FRONTING_COUNTRY_VIEW_TITLE" = "Select Country"; - /* Alert body for when the user has just tried to edit a contacts after declining to give Signal contacts permissions */ "EDIT_CONTACT_WITHOUT_CONTACTS_PERMISSION_ALERT_BODY" = "You can give access in the Settings app."; @@ -466,9 +466,12 @@ /* No comment provided by engineer. */ "ERROR_MESSAGE_NO_SESSION" = "No available session for contact."; -/* No comment provided by engineer. */ +/* Shown when signal users safety numbers changed */ "ERROR_MESSAGE_NON_BLOCKING_IDENTITY_CHANGE" = "Safety number changed."; +/* Shown when signal users safety numbers changed, embeds the user's {{name or phone number}} */ +"ERROR_MESSAGE_NON_BLOCKING_IDENTITY_CHANGE_FORMAT" = "ERROR_MESSAGE_NON_BLOCKING_IDENTITY_CHANGE_FORMAT"; + /* No comment provided by engineer. */ "ERROR_MESSAGE_UNKNOWN_ERROR" = "An unknown error occurred."; @@ -1264,7 +1267,7 @@ /* In Inbox view, last message label for thread with corrupted attachment. */ "UNKNOWN_ATTACHMENT_LABEL" = "Unknown attachment"; -/* No comment provided by engineer. */ +/* Message shown in conversation view that offers to block an unknown user. */ "UNKNOWN_CONTACT_BLOCK_OFFER" = "User not in your contacts. Would you like to block this user?"; /* Displayed if for some reason we can't determine a contacts phone number *or* name */