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

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

Issue 2934453004: [Autofill] Fixes bug where toggling Google Payments switch was crashing cr. (Closed)
Patch Set: Created 3 years, 6 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/autofill_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/settings/autofill_collection_view_controller.mm b/ios/chrome/browser/ui/settings/autofill_collection_view_controller.mm
index 9f901101cf70c322bfbe2cf1271973fdddb3374f..a6a164aaec78942bfe129df3333d5e314a691216 100644
--- a/ios/chrome/browser/ui/settings/autofill_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/autofill_collection_view_controller.mm
@@ -303,11 +303,6 @@ typedef NS_ENUM(NSInteger, ItemType) {
_userInteractionInProgress = YES;
[self setWalletEnabled:[switchView isOn]];
_userInteractionInProgress = NO;
- if ([switchView isOn]) {
- [self insertCardSection];
- } else {
- [self removeCardSection];
- }
}
#pragma mark - Switch Helpers
@@ -389,27 +384,6 @@ typedef NS_ENUM(NSInteger, ItemType) {
return sections;
}
-- (void)insertCardSection {
- [self populateCardSection];
- if ([self.collectionViewModel
- hasSectionForSectionIdentifier:SectionIdentifierCards]) {
- NSInteger section = [self.collectionViewModel
- sectionForSectionIdentifier:SectionIdentifierCards];
- [self.collectionView insertSections:[NSIndexSet indexSetWithIndex:section]];
- }
-}
-
-- (void)removeCardSection {
- if (![self.collectionViewModel
- hasSectionForSectionIdentifier:SectionIdentifierCards]) {
- return;
- }
- NSInteger section = [self.collectionViewModel
- sectionForSectionIdentifier:SectionIdentifierCards];
- [self.collectionViewModel removeSectionWithIdentifier:SectionIdentifierCards];
- [self.collectionView deleteSections:[NSIndexSet indexSetWithIndex:section]];
-}
-
#pragma mark - MDCCollectionViewStylingDelegate
- (CGFloat)collectionView:(UICollectionView*)collectionView
« 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