Respond to CR.

pull/1/head
Matthew Chen 8 years ago
parent 288d049cee
commit a87b79341f

@ -1 +1 @@
Subproject commit 267e347b1eb97f8fd2e03a881b1a1c0c1de20e0f Subproject commit 9a4161d91bf218604eefef73a6ba237cc2f3188d

@ -67,12 +67,6 @@ NS_ASSUME_NONNULL_BEGIN
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.navigationItem.backBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"BACK_BUTTON", @"button text for back button")
style:UIBarButtonItemStylePlain
target:self
action:@selector(backButtonWasPressed)];
[self createViews]; [self createViews];
[self initializeKeyboardHandlers]; [self initializeKeyboardHandlers];
@ -273,7 +267,7 @@ NS_ASSUME_NONNULL_BEGIN
DDLogInfo(@"%@ Successfully registered Signal account.", weakSelf.logTag); DDLogInfo(@"%@ Successfully registered Signal account.", weakSelf.logTag);
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf stopActivityIndicator]; [weakSelf stopActivityIndicator];
[weakSelf vericationWasCompleted]; [weakSelf verificationWasCompleted];
}); });
}) })
.catch(^(NSError *error) { .catch(^(NSError *error) {
@ -301,7 +295,7 @@ NS_ASSUME_NONNULL_BEGIN
}); });
} }
- (void)vericationWasCompleted - (void)verificationWasCompleted
{ {
[ProfileViewController presentForRegistration:self.navigationController]; [ProfileViewController presentForRegistration:self.navigationController];
} }
@ -492,11 +486,6 @@ NS_ASSUME_NONNULL_BEGIN
[self submitVerificationCode]; [self submitVerificationCode];
} }
- (void)backButtonWasPressed
{
[self.navigationController popViewControllerAnimated:YES];
}
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

@ -245,7 +245,7 @@ NS_ASSUME_NONNULL_BEGIN
[modalActivityIndicator dismissWithCompletion:^{ [modalActivityIndicator dismissWithCompletion:^{
OWSAssertIsOnMainThread(); OWSAssertIsOnMainThread();
[weakSelf vericationWasCompleted]; [weakSelf verificationWasCompleted];
}]; }];
}); });
}) })
@ -257,12 +257,11 @@ NS_ASSUME_NONNULL_BEGIN
[modalActivityIndicator dismissWithCompletion:^{ [modalActivityIndicator dismissWithCompletion:^{
OWSAssertIsOnMainThread(); OWSAssertIsOnMainThread();
[OWSAlerts [OWSAlerts showAlertWithTitle:NSLocalizedString(
showAlertWithTitle:NSLocalizedString(@"ALERT_ERROR_TITLE", @"") @"REGISTER_2FA_REGISTRATION_FAILED_ALERT_TITLE",
message:NSLocalizedString(@"REGISTER_2FA_REGISTRATION_FAILED", @"Title for alert indicating that attempt to "
@"Error indicating that attempt to register with " @"register with 'two-factor auth' failed.")
@"'two-factor " message:error.localizedDescription];
@"auth' failed.")];
[weakSelf.pinTextfield becomeFirstResponder]; [weakSelf.pinTextfield becomeFirstResponder];
}]; }];
@ -271,7 +270,7 @@ NS_ASSUME_NONNULL_BEGIN
}]; }];
} }
- (void)vericationWasCompleted - (void)verificationWasCompleted
{ {
[ProfileViewController presentForRegistration:self.navigationController]; [ProfileViewController presentForRegistration:self.navigationController];
} }

@ -280,9 +280,6 @@
/* Accessibilty label for placing call button */ /* Accessibilty label for placing call button */
"CALL_LABEL" = "Call"; "CALL_LABEL" = "Call";
/* Text shown on call screen in place of remote video */
"CALL_REMOTE_VIDEO_DISABLED" = "Please upgrade to iOS 9 or newer to see remote video.";
/* Call setup status label after outgoing call times out */ /* Call setup status label after outgoing call times out */
"CALL_SCREEN_STATUS_NO_ANSWER" = "No Answer."; "CALL_SCREEN_STATUS_NO_ANSWER" = "No Answer.";
@ -1392,8 +1389,8 @@
/* Instructions to enter the 'two-factor auth pin' in the 2FA registration view. */ /* Instructions to enter the 'two-factor auth pin' in the 2FA registration view. */
"REGISTER_2FA_INSTRUCTIONS" = "This phone number has Registration Lock enabled. Please enter the Registration Lock PIN.\n\nYour Registration Lock PIN is separate from the automated verification code that was sent to your phone during the last step."; "REGISTER_2FA_INSTRUCTIONS" = "This phone number has Registration Lock enabled. Please enter the Registration Lock PIN.\n\nYour Registration Lock PIN is separate from the automated verification code that was sent to your phone during the last step.";
/* Error indicating that attempt to register with 'two-factor auth' failed. */ /* Title for alert indicating that attempt to register with 'two-factor auth' failed. */
"REGISTER_2FA_REGISTRATION_FAILED" = "Registration failed."; "REGISTER_2FA_REGISTRATION_FAILED_ALERT_TITLE" = "Registration Failed";
/* Label for 'submit' button in the 2FA registration view. */ /* Label for 'submit' button in the 2FA registration view. */
"REGISTER_2FA_SUBMIT_BUTTON" = "Submit"; "REGISTER_2FA_SUBMIT_BUTTON" = "Submit";

@ -12,9 +12,8 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
// TODO: ?
const NSUInteger kMin2FAPinLength = 4; const NSUInteger kMin2FAPinLength = 4;
const NSUInteger kMax2FAPinLength = 14; const NSUInteger kMax2FAPinLength = 16;
@implementation ViewControllerUtils @implementation ViewControllerUtils

Loading…
Cancel
Save