Skip to content

Commit

Permalink
[iOS][MF] Fix constraints on password cell
Browse files Browse the repository at this point in the history
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/1355137
Reviewed-by: Yi Su <[email protected]>
Commit-Queue: Javier Ernesto Flores Robles <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#612609}(cherry picked from commit 3f9e02a)
Reviewed-on: https://chromium-review.googlesource.com/c/1363272
Reviewed-by: Javier Ernesto Flores Robles <[email protected]>
Cr-Commit-Position: refs/branch-heads/3626@{#73}
Cr-Branched-From: d897fb1-refs/heads/master@{#612437}
  • Loading branch information
Javier Ernesto Flores Robles committed Dec 5, 2018
1 parent 2df866f commit fe7fa78
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,23 @@ @implementation ManualFillPasswordCell

- (void)prepareForReuse {
[super prepareForReuse];
[NSLayoutConstraint deactivateConstraints:self.verticalConstraints];
self.verticalConstraints = @[];

self.siteNameLabel.text = @"";

[self.usernameButton setTitle:@"" forState:UIControlStateNormal];
self.usernameButton.enabled = YES;
[self.usernameButton setTitleColor:UIColor.cr_manualFillTintColor
forState:UIControlStateNormal];

[self.passwordButton setTitle:@"" forState:UIControlStateNormal];
self.passwordButton.accessibilityLabel = nil;
self.passwordButton.hidden = NO;

self.manualFillCredential = nil;

self.grayLine.hidden = NO;
}

- (void)setUpWithCredential:(ManualFillCredential*)credential
Expand Down Expand Up @@ -183,10 +191,7 @@ - (void)setUpWithCredential:(ManualFillCredential*)credential
self.passwordButton.hidden = YES;
}

if (!isConnectedToNextCell) {
[verticalLeadViews addObject:self.grayLine];
self.grayLine.hidden = NO;
} else {
if (isConnectedToNextCell) {
self.grayLine.hidden = YES;
}

Expand Down

0 comments on commit fe7fa78

Please sign in to comment.