Commit 3f9e02a9 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][MF] Fix constraints on password cell

Clears the vertical constraints for reuse.
Removes extra vertical constraints from separator.

Bug: 878388, 845472
Change-Id: I5ba9efdacd2ac642361069b241a9e53956edc215
Reviewed-on: https://chromium-review.googlesource.com/c/1355137Reviewed-by: default avatarYi Su <mrsuyi@chromium.org>
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612609}
parent 39cf762f
...@@ -107,15 +107,23 @@ static const CGFloat NoMultiplier = 1.0; ...@@ -107,15 +107,23 @@ static const CGFloat NoMultiplier = 1.0;
- (void)prepareForReuse { - (void)prepareForReuse {
[super prepareForReuse]; [super prepareForReuse];
[NSLayoutConstraint deactivateConstraints:self.verticalConstraints];
self.verticalConstraints = @[];
self.siteNameLabel.text = @""; self.siteNameLabel.text = @"";
[self.usernameButton setTitle:@"" forState:UIControlStateNormal]; [self.usernameButton setTitle:@"" forState:UIControlStateNormal];
self.usernameButton.enabled = YES; self.usernameButton.enabled = YES;
[self.usernameButton setTitleColor:UIColor.cr_manualFillTintColor [self.usernameButton setTitleColor:UIColor.cr_manualFillTintColor
forState:UIControlStateNormal]; forState:UIControlStateNormal];
[self.passwordButton setTitle:@"" forState:UIControlStateNormal]; [self.passwordButton setTitle:@"" forState:UIControlStateNormal];
self.passwordButton.accessibilityLabel = nil; self.passwordButton.accessibilityLabel = nil;
self.passwordButton.hidden = NO; self.passwordButton.hidden = NO;
self.manualFillCredential = nil; self.manualFillCredential = nil;
self.grayLine.hidden = NO;
} }
- (void)setUpWithCredential:(ManualFillCredential*)credential - (void)setUpWithCredential:(ManualFillCredential*)credential
...@@ -183,10 +191,7 @@ static const CGFloat NoMultiplier = 1.0; ...@@ -183,10 +191,7 @@ static const CGFloat NoMultiplier = 1.0;
self.passwordButton.hidden = YES; self.passwordButton.hidden = YES;
} }
if (!isConnectedToNextCell) { if (isConnectedToNextCell) {
[verticalLeadViews addObject:self.grayLine];
self.grayLine.hidden = NO;
} else {
self.grayLine.hidden = YES; self.grayLine.hidden = YES;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment