Commit df71978f authored by Nohemi Fernandez's avatar Nohemi Fernandez Committed by Chromium LUCI CQ

[iOS][MICe] Fix UI crash when signing in to account with Sync password.

This patch fixes a crash that occurs when a user goes through the
advanced Sync settings sign-in flow with an account that has a Sync
encryption password.

Starting from this patch Sync error cards are only displayed after the
sign-in flow has been completed.

Bug: 1125631
Change-Id: I877e59e25265e78a4220fbb66b7a3855757dceb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2637575Reviewed-by: default avatarJérôme Lebel <jlebel@chromium.org>
Commit-Queue: Nohemi Fernandez <fernandex@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844771}
parent 598b91e4
......@@ -220,9 +220,9 @@ NSString* kGoogleServicesSyncErrorImage = @"google_services_sync_error";
self.encryptionItem.accessoryType =
hasDisclosureIndicator ? UITableViewCellAccessoryDisclosureIndicator
: UITableViewCellAccessoryNone;
[self updateEncryptionItem:NO];
[model addItem:self.encryptionItem
toSectionWithIdentifier:AdvancedSettingsSectionIdentifier];
[self updateEncryptionItem:NO];
// GoogleActivityControlsItemType.
TableViewImageItem* googleActivityControlsItem =
......@@ -285,7 +285,7 @@ NSString* kGoogleServicesSyncErrorImage = @"google_services_sync_error";
self.encryptionItem.textColor = UIColor.cr_secondaryLabelColor;
}
if (needsUpdate && notifyConsumer) {
[self.consumer reloadItem:self.self.encryptionItem];
[self.consumer reloadItem:self.encryptionItem];
}
}
......@@ -561,7 +561,8 @@ NSString* kGoogleServicesSyncErrorImage = @"google_services_sync_error";
// Updates the sync errors section. If |notifyConsumer| is YES, the consumer is
// notified about model changes.
- (void)updateSyncErrorsSection:(BOOL)notifyConsumer {
if (!base::FeatureList::IsEnabled(signin::kMobileIdentityConsistency)) {
if (!base::FeatureList::IsEnabled(signin::kMobileIdentityConsistency) ||
!self.syncSetupService->HasFinishedInitialSetup()) {
return;
}
BOOL needsSyncErrorItemsUpdate = [self updateSyncErrorItems];
......
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