Commit 0949160e authored by gambard's avatar gambard Committed by Commit Bot

Reset data holder for section title on reload

The section identifiers of the added sections part of ContentSuggestions
need to be reset when all the data concerning the added items is reset.

Bug: 752037
Change-Id: Ic37871e9f8f8bb3e43bc63af03a47d1756902fbe
Reviewed-on: https://chromium-review.googlesource.com/600048Reviewed-by: default avatarJean-François Geyelin <jif@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491698}
parent 42291994
......@@ -162,7 +162,6 @@ const CGFloat kNumberOfMostVisitedLines = 2;
_promoAdded = NO;
_dataSource = dataSource;
_dataSource.dataSink = self;
_sectionIdentifiersFromContentSuggestions = [[NSMutableSet alloc] init];
}
return self;
}
......@@ -588,6 +587,7 @@ addSuggestionsToModel:(NSArray<CSCollectionViewItem*>*)suggestions
- (void)resetModels {
[self.collectionViewController loadModel];
self.sectionInfoBySectionIdentifier = [[NSMutableDictionary alloc] init];
self.sectionIdentifiersFromContentSuggestions = [[NSMutableSet alloc] init];
}
// Runs the additional action for the section identified by |sectionInfo|.
......
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