From 50cd4f54fcbe04262de72cf0b88053c23d4456c8 Mon Sep 17 00:00:00 2001 From: nixnuex Date: Sat, 17 Sep 2016 18:36:17 +0200 Subject: [PATCH] verification code field: improved user experience (#1325) --- .../src/view controllers/CodeVerificationViewController.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Signal/src/view controllers/CodeVerificationViewController.m b/Signal/src/view controllers/CodeVerificationViewController.m index f6ea59321..7ab520a40 100644 --- a/Signal/src/view controllers/CodeVerificationViewController.m +++ b/Signal/src/view controllers/CodeVerificationViewController.m @@ -274,12 +274,12 @@ return NO; } - if (range.length == 0 && range.location == 3) { - textField.text = [NSString stringWithFormat:@"%@-%@", textField.text, string]; + if (range.length == 0 && range.location == 2) { + textField.text = [NSString stringWithFormat:@"%@%@-", textField.text, string]; return NO; } - if (range.length == 1 && range.location == 4) { + if (range.length == 1 && range.location == 3) { range.location--; range.length = 2; textField.text = [textField.text stringByReplacingCharactersInRange:range withString:@""];