Merge branch 'charlesmchen/onboardingFixes' into release/2.37.0

pull/2/head
Matthew Chen 6 years ago
commit e647ba1d2a

@ -378,7 +378,10 @@ typedef NS_ENUM(NSInteger, HomeViewControllerSection) {
emptyInboxImageView.layer.minificationFilter = kCAFilterTrilinear;
emptyInboxImageView.layer.magnificationFilter = kCAFilterTrilinear;
[emptyInboxImageView autoPinToAspectRatioWithSize:emptyInboxImageView.image.size];
CGSize screenSize = UIScreen.mainScreen.bounds.size;
CGFloat emptyInboxImageSize = MIN(screenSize.width, screenSize.height) * 0.65f;
[emptyInboxImageView autoSetDimension:ALDimensionWidth toSize:emptyInboxImageSize];
UILabel *emptyInboxLabel = [UILabel new];
emptyInboxLabel.text = NSLocalizedString(@"INBOX_VIEW_EMPTY_INBOX",
@"Message shown in the home view when the inbox is empty.");
@ -444,7 +447,7 @@ typedef NS_ENUM(NSInteger, HomeViewControllerSection) {
};
[layerView addSubview:label];
[label ows_autoPinToSuperviewMargins];
[label autoPinEdgesToSuperviewMargins];
layerView.userInteractionEnabled = YES;
[layerView

@ -73,7 +73,6 @@ public class Onboarding2FAViewController: OnboardingBaseViewController {
explanationLabel1,
UIView.spacer(withHeight: 10),
explanationLabel2,
topSpacer,
pinTextField,
UIView.spacer(withHeight: 10),
@ -85,7 +84,7 @@ public class Onboarding2FAViewController: OnboardingBaseViewController {
])
stackView.axis = .vertical
stackView.alignment = .fill
stackView.layoutMargins = UIEdgeInsets(top: 20, left: 32, bottom: 20, right: 32)
stackView.layoutMargins = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16)
stackView.isLayoutMarginsRelativeArrangement = true
view.addSubview(stackView)
stackView.autoPinWidthToSuperview()

@ -86,6 +86,8 @@ public class OnboardingBaseViewController: OWSViewController {
} else {
owsFailDebug("Missing or invalid navigationController")
}
view.layoutIfNeeded()
}
public override func viewDidAppear(_ animated: Bool) {

@ -318,7 +318,7 @@ public class OnboardingVerificationViewController: OnboardingBaseViewController
])
stackView.axis = .vertical
stackView.alignment = .fill
stackView.layoutMargins = UIEdgeInsets(top: 32, left: 32, bottom: 32, right: 32)
stackView.layoutMargins = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16)
stackView.isLayoutMarginsRelativeArrangement = true
view.addSubview(stackView)
stackView.autoPinWidthToSuperview()
@ -437,6 +437,8 @@ public class OnboardingVerificationViewController: OnboardingBaseViewController
}
}
// MARK: - View Lifecycle
public override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
@ -491,7 +493,7 @@ public class OnboardingVerificationViewController: OnboardingBaseViewController
Logger.info("")
guard onboardingCodeView.isComplete else {
self.setHasInvalidCode(true)
self.setHasInvalidCode(false)
return
}
@ -499,7 +501,12 @@ public class OnboardingVerificationViewController: OnboardingBaseViewController
onboardingController.update(verificationCode: onboardingCodeView.verificationCode)
// Temporarily hide the "resend link" button during the verification attempt.
codeStateLink?.layer.opacity = 0.05
onboardingController.tryToVerify(fromViewController: self, completion: { (outcome) in
self.codeStateLink?.layer.opacity = 1
if outcome == .invalidVerificationCode {
self.setHasInvalidCode(true)
}

@ -1551,7 +1551,7 @@
"ONBOARDING_SPLASH_TERM_AND_PRIVACY_POLICY" = "Terms & Privacy Policy";
/* Title of the 'onboarding splash' view. */
"ONBOARDING_SPLASH_TITLE" = "Signal is the private messenger for everybody";
"ONBOARDING_SPLASH_TITLE" = "Take privacy with you.\nBe yourself in every message.";
/* Label for the link that lets users change their phone number in the onboarding views. */
"ONBOARDING_VERIFICATION_BACK_LINK" = "Wrong number?";

Loading…
Cancel
Save