Respond to CR.

pull/1/head
Matthew Chen 7 years ago
parent a5128273ba
commit caeb97b466

@ -1,7 +1,7 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
CFPropertyList (2.3.5) CFPropertyList (2.3.6)
activesupport (4.2.10) activesupport (4.2.10)
i18n (~> 0.7) i18n (~> 0.7)
minitest (~> 5.1) minitest (~> 5.1)
@ -9,32 +9,33 @@ GEM
tzinfo (~> 1.1) tzinfo (~> 1.1)
addressable (2.5.2) addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0) public_suffix (>= 2.0.2, < 4.0)
atomos (0.1.2)
babosa (1.0.2) babosa (1.0.2)
claide (1.0.2) claide (1.0.2)
cocoapods (1.3.1) cocoapods (1.4.0)
activesupport (>= 4.0.2, < 5) activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0) claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.3.1) cocoapods-core (= 1.4.0)
cocoapods-deintegrate (>= 1.0.1, < 2.0) cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.1.3, < 2.0) cocoapods-downloader (>= 1.1.3, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0) cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.2.0, < 2.0) cocoapods-trunk (>= 1.3.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1) colored2 (~> 3.1)
escape (~> 0.0.4) escape (~> 0.0.4)
fourflusher (~> 2.0.1) fourflusher (~> 2.0.1)
gh_inspector (~> 1.0) gh_inspector (~> 1.0)
molinillo (~> 0.5.7) molinillo (~> 0.6.4)
nap (~> 1.0) nap (~> 1.0)
ruby-macho (~> 1.1) ruby-macho (~> 1.1)
xcodeproj (>= 1.5.1, < 2.0) xcodeproj (>= 1.5.4, < 2.0)
cocoapods-core (1.3.1) cocoapods-core (1.4.0)
activesupport (>= 4.0.2, < 6) activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4) fuzzy_match (~> 2.0.4)
nap (~> 1.0) nap (~> 1.0)
cocoapods-deintegrate (1.0.1) cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.1.3) cocoapods-downloader (1.1.3)
cocoapods-plugins (1.0.0) cocoapods-plugins (1.0.0)
nap nap
@ -48,6 +49,7 @@ GEM
colored2 (3.1.2) colored2 (3.1.2)
commander-fastlane (4.4.5) commander-fastlane (4.4.5)
highline (~> 1.7.2) highline (~> 1.7.2)
concurrent-ruby (1.0.5)
declarative (0.0.10) declarative (0.0.10)
declarative-option (0.1.0) declarative-option (0.1.0)
domain_name (0.5.20170404) domain_name (0.5.20170404)
@ -98,7 +100,7 @@ GEM
xcpretty-travis-formatter (>= 0.0.3) xcpretty-travis-formatter (>= 0.0.3)
fourflusher (2.0.1) fourflusher (2.0.1)
fuzzy_match (2.0.4) fuzzy_match (2.0.4)
gh_inspector (1.0.3) gh_inspector (1.1.2)
google-api-client (0.13.6) google-api-client (0.13.6)
addressable (~> 2.5, >= 2.5.1) addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.5) googleauth (~> 0.5)
@ -118,7 +120,8 @@ GEM
http-cookie (1.0.3) http-cookie (1.0.3)
domain_name (~> 0.5) domain_name (~> 0.5)
httpclient (2.8.3) httpclient (2.8.3)
i18n (0.8.6) i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (2.1.0) json (2.1.0)
jwt (1.5.6) jwt (1.5.6)
little-plugger (1.1.4) little-plugger (1.1.4)
@ -130,8 +133,8 @@ GEM
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521) mime-types-data (3.2016.0521)
mini_magick (4.5.1) mini_magick (4.5.1)
minitest (5.10.3) minitest (5.11.3)
molinillo (0.5.7) molinillo (0.6.4)
multi_json (1.12.2) multi_json (1.12.2)
multi_xml (0.6.0) multi_xml (0.6.0)
multipart-post (2.0.0) multipart-post (2.0.0)
@ -161,7 +164,7 @@ GEM
unicode-display_width (~> 1.1, >= 1.1.1) unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6) thread_safe (0.3.6)
tty-screen (0.5.0) tty-screen (0.5.0)
tzinfo (1.2.3) tzinfo (1.2.5)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uber (0.1.0) uber (0.1.0)
unf (0.1.4) unf (0.1.4)
@ -169,8 +172,9 @@ GEM
unf_ext (0.0.7.4) unf_ext (0.0.7.4)
unicode-display_width (1.3.0) unicode-display_width (1.3.0)
word_wrap (1.0.0) word_wrap (1.0.0)
xcodeproj (1.5.2) xcodeproj (1.5.6)
CFPropertyList (~> 2.3.3) CFPropertyList (~> 2.3.3)
atomos (~> 0.1.2)
claide (>= 1.0.2, < 2.0) claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1) colored2 (~> 3.1)
nanaimo (~> 0.2.3) nanaimo (~> 0.2.3)
@ -187,4 +191,4 @@ DEPENDENCIES
fastlane fastlane
BUNDLED WITH BUNDLED WITH
1.14.6 1.16.1

@ -322,8 +322,7 @@ NS_ASSUME_NONNULL_BEGIN
if (textAfterChange.length > kMaxPinLength) { if (textAfterChange.length > kMaxPinLength) {
textAfterChange = [textAfterChange substringToIndex:kMaxPinLength]; textAfterChange = [textAfterChange substringToIndex:kMaxPinLength];
} }
// 6. Construct the "formatted" new text by inserting a hyphen if necessary. // 6. Construct the final text.
// reformat the phone number, trying to keep the cursor beside the inserted or deleted digit
textField.text = textAfterChange; textField.text = textAfterChange;
NSUInteger cursorPositionAfterChange = MIN(left.length + center.length, textAfterChange.length); NSUInteger cursorPositionAfterChange = MIN(left.length + center.length, textAfterChange.length);
UITextPosition *pos = UITextPosition *pos =

@ -1,15 +1,15 @@
// //
// TSRegisterForPushRequest.h // Copyright (c) 2018 Open Whisper Systems. All rights reserved.
// TextSecureiOS
//
// Created by Frederic Jacobs on 10/13/13.
// Copyright (c) 2013 Open Whisper Systems. All rights reserved.
// //
#import "TSRequest.h" #import "TSRequest.h"
NS_ASSUME_NONNULL_BEGIN
@interface TSRegisterForPushRequest : TSRequest @interface TSRegisterForPushRequest : TSRequest
- (id)initWithPushIdentifier:(NSString *)identifier voipIdentifier:(NSString *)voipId; - (id)initWithPushIdentifier:(NSString *)identifier voipIdentifier:(NSString *)voipId;
@end @end
NS_ASSUME_NONNULL_END

@ -5,6 +5,8 @@
#import "TSRegisterForPushRequest.h" #import "TSRegisterForPushRequest.h"
#import "TSConstants.h" #import "TSConstants.h"
NS_ASSUME_NONNULL_BEGIN
@implementation TSRegisterForPushRequest @implementation TSRegisterForPushRequest
- (id)initWithPushIdentifier:(NSString *)identifier voipIdentifier:(NSString *)voipId { - (id)initWithPushIdentifier:(NSString *)identifier voipIdentifier:(NSString *)voipId {
@ -17,15 +19,15 @@
self.HTTPMethod = @"PUT"; self.HTTPMethod = @"PUT";
NSMutableDictionary *parameters = [@{ @"apnRegistrationId" : identifier } mutableCopy]; OWSAssert(voipId);
self.parameters = @{
if (voipId) { @"apnRegistrationId" : identifier,
parameters[@"voipRegistrationId"] = voipId; @"voipRegistrationId" : voipId ?: @"",
} };
self.parameters = parameters;
return self; return self;
} }
@end @end
NS_ASSUME_NONNULL_END

Loading…
Cancel
Save