Commit ed57c049 authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

[iOS] Update the sign-in primary button according to view controller state

The primary button needs to be updated according to current state of
ChromeSigninViewController.
Bug introduced with crrev.com/c/1695411

Bug: 987985
Change-Id: Idfbfbaa48b62fead98d23d2ba464fc46c3285e62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1720836Reviewed-by: default avatarJavier Ernesto Flores Robles <javierrobles@chromium.org>
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681386}
parent ec84fd63
......@@ -1028,7 +1028,19 @@ enum AuthenticationState {
[self updateGradientColors];
// As of iOS 13 Beta 3, MDCFlatButton doesn't update it's colors
// automatically. These lines do it instead.
[self updatePrimaryButtonForIdentityPickerState];
switch (_currentState) {
case IDENTITY_PICKER_STATE:
[self updatePrimaryButtonForIdentityPickerState];
break;
case IDENTITY_SELECTED_STATE:
[self updatePrimaryButtonForIdentitySelectedState];
break;
case NULL_STATE:
case SIGNIN_PENDING_STATE:
case DONE_STATE:
// Transitional states. No need to updated the primary button.
break;
}
[self setSecondaryButtonStyling:_secondaryButton];
}
}
......
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