Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: ios/chrome/browser/ui/settings/voicesearch_collection_view_controller.mm

Issue 2862583005: Update the Speak answers back switch item. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/settings/voicesearch_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/settings/voicesearch_collection_view_controller.mm b/ios/chrome/browser/ui/settings/voicesearch_collection_view_controller.mm
index 34a660b714a07df7111da3f493e3e311dedd1d9e..78f4c451c95bcf8c6789fdf066ceeeb70b5abd72 100644
--- a/ios/chrome/browser/ui/settings/voicesearch_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/voicesearch_collection_view_controller.mm
@@ -237,6 +237,12 @@ typedef NS_ENUM(NSInteger, ItemType) {
if (on != switchView.isOn) {
[switchView setOn:on animated:YES];
}
+ // Also update the switch item.
+ CollectionViewSwitchItem* switchItem =
+ base::mac::ObjCCastStrict<CollectionViewSwitchItem>(
+ [self.collectionViewModel itemAtIndexPath:switchPath]);
+ switchItem.enabled = enabled;
+ switchItem.on = on;
[self reconfigureCellsForItems:modifiedItems];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698