Commit d57638fd authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

Hides the ink using dedicated method

To hide the ink on the empty items, ContentSuggestions was using a
transparent color for the ink instead of not starting the animation due
to an MDC bug. As the bug is fixed, the correct method can be used.

Bug: 724493
Change-Id: Id4a63ddcc9977b9c017f882bcf17c2a026ee13b2
Reviewed-on: https://chromium-review.googlesource.com/663340Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501300}
parent 2998ed51
......@@ -435,18 +435,13 @@ BOOL ShouldCellsBeFullWidth(UITraitCollection* collection) {
#pragma mark - MDCCollectionViewStylingDelegate
// TODO(crbug.com/724493): Use collectionView:hidesInkViewAtIndexPath: when it
// is fixed. For now hidding the ink prevent cell interaction.
- (UIColor*)collectionView:(UICollectionView*)collectionView
inkColorAtIndexPath:(NSIndexPath*)indexPath {
- (BOOL)collectionView:(UICollectionView*)collectionView
hidesInkViewAtIndexPath:(NSIndexPath*)indexPath {
ContentSuggestionType itemType = [self.collectionUpdater
contentSuggestionTypeForItem:[self.collectionViewModel
itemAtIndexPath:indexPath]];
if ([self.collectionUpdater isMostVisitedSection:indexPath.section] ||
itemType == ContentSuggestionTypeEmpty) {
return [UIColor clearColor];
}
return nil;
return [self.collectionUpdater isMostVisitedSection:indexPath.section] ||
itemType == ContentSuggestionTypeEmpty;
}
- (UIColor*)collectionView:(nonnull UICollectionView*)collectionView
......
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