Commit f6aba347 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Fix reading list hidden count.

Bug: 831778
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I74a6f95430be7a4651c0bedf13d0f58b38d089a5
Reviewed-on: https://chromium-review.googlesource.com/1011144Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550568}
parent 795195df
......@@ -16,6 +16,9 @@
// Title of the action.
@property(nonatomic, strong, readonly, nonnull) UILabel* titleLabel;
// Container view for |countLabel|.
@property(nonatomic, strong, readonly, nonnull) UIView* countContainer;
// Number shown in circle by top trailing side of cell.
@property(nonatomic, strong, readonly, nonnull) UILabel* countLabel;
......
......@@ -21,13 +21,6 @@ const CGFloat kCountBorderWidth = 24;
} // namespace
@interface ContentSuggestionsMostVisitedActionCell ()
// Container view for |countLabel|.
@property(nonatomic, strong, readonly, nonnull) UIView* countContainer;
@end
@implementation ContentSuggestionsMostVisitedActionCell : MDCCollectionViewCell
@synthesize countContainer = _countContainer;
......
......@@ -38,8 +38,12 @@
cell.titleLabel.text = self.title;
cell.accessibilityLabel = self.title;
cell.iconView.image = [self imageForAction:_action];
if (self.count != 0)
if (self.count != 0) {
cell.countLabel.text = [@(self.count) stringValue];
cell.countContainer.hidden = NO;
} else {
cell.countContainer.hidden = YES;
}
}
#pragma mark - ContentSuggestionsItem
......
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