Respond to CR.

This commit is contained in:
Matthew Chen 2018-03-02 11:10:09 -05:00
parent 288d049cee
commit a87b79341f
5 changed files with 13 additions and 29 deletions

2
Pods

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

View File

@ -67,12 +67,6 @@ NS_ASSUME_NONNULL_BEGIN
- (void)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 initializeKeyboardHandlers];
@ -273,7 +267,7 @@ NS_ASSUME_NONNULL_BEGIN
DDLogInfo(@"%@ Successfully registered Signal account.", weakSelf.logTag);
dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf stopActivityIndicator];
[weakSelf vericationWasCompleted];
[weakSelf verificationWasCompleted];
});
})
.catch(^(NSError *error) {
@ -301,7 +295,7 @@ NS_ASSUME_NONNULL_BEGIN
});
}
- (void)vericationWasCompleted
- (void)verificationWasCompleted
{
[ProfileViewController presentForRegistration:self.navigationController];
}
@ -492,11 +486,6 @@ NS_ASSUME_NONNULL_BEGIN
[self submitVerificationCode];
}
- (void)backButtonWasPressed
{
[self.navigationController popViewControllerAnimated:YES];
}
@end
NS_ASSUME_NONNULL_END

View File

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

View File

@ -280,9 +280,6 @@
/* Accessibilty label for placing call button */
"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_SCREEN_STATUS_NO_ANSWER" = "No Answer.";
@ -1392,8 +1389,8 @@
/* 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.";
/* Error indicating that attempt to register with 'two-factor auth' failed. */
"REGISTER_2FA_REGISTRATION_FAILED" = "Registration failed.";
/* Title for alert indicating that attempt to register with 'two-factor auth' failed. */
"REGISTER_2FA_REGISTRATION_FAILED_ALERT_TITLE" = "Registration Failed";
/* Label for 'submit' button in the 2FA registration view. */
"REGISTER_2FA_SUBMIT_BUTTON" = "Submit";

View File

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