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

[iOS] Plugging user consent preferences to the Google service settings

When the switch is toggled, the preference is updated, but the cell
should not be reloaded (to let the animation finish).
The UI is reloaded only when a value update notification is received
without user action.

When the user consent is removed, all sections are expanded and all
cells inside are enabled to be modified.

https://drive.google.com/open?id=1hvi5LyGjBDODkRQymvC5sbUjSN9tafFz

Bug: 827072, 849838
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I5bc39e1ee80d8844e56900a7a22e8201a3e2d411
Reviewed-on: https://chromium-review.googlesource.com/1144934
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580830}
parent 56d45d48
......@@ -16,6 +16,9 @@
@property(nonatomic, strong, readonly)
CollectionViewModel<CollectionViewItem*>* collectionViewModel;
// Reloads |sections|.
- (void)reloadSections:(NSIndexSet*)sections;
@end
#endif // IOS_CHROME_BROWSER_UI_SETTINGS_GOOGLE_SERVICES_SETTINGS_CONSUMER_H_
......@@ -29,7 +29,7 @@ class PrefService;
// View controller.
@property(nonatomic, weak) id<GoogleServicesSettingsConsumer> consumer;
// Browser state.
// Authentication service.
@property(nonatomic, assign) AuthenticationService* authService;
@end
......
......@@ -166,6 +166,10 @@ constexpr NSInteger kSectionOffset = 1000;
return cell;
}
- (void)reloadSections:(NSIndexSet*)sections {
[self.collectionView reloadSections:sections];
}
#pragma mark - CollectionViewController
- (void)loadModel {
......
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