4
4
5
5
#import " ios/chrome/browser/ui/bookmarks/bookmark_folder_table_view_cell.h"
6
6
7
+ #include " ios/chrome/browser/bookmarks/bookmark_new_generation_features.h"
7
8
#import " ios/chrome/browser/ui/bookmarks/bookmark_utils_ios.h"
8
9
#import " ios/chrome/browser/ui/rtl_geometry.h"
9
10
#include " ios/chrome/grit/ios_strings.h"
@@ -42,7 +43,8 @@ + (instancetype)folderCell {
42
43
[[[self class ] alloc ] initWithStyle: UITableViewCellStyleDefault
43
44
reuseIdentifier: [self folderCellReuseIdentifier ]];
44
45
folderCell.indentationWidth = kFolderCellIndentationWidth ;
45
- folderCell.imageView .image = [UIImage imageNamed: @" bookmark_gray_folder" ];
46
+ folderCell.imageView .image =
47
+ [UIImage imageNamed: [[self class ] bookmarkFolderImageName ]];
46
48
return folderCell;
47
49
}
48
50
@@ -65,7 +67,8 @@ - (instancetype)initWithStyle:(UITableViewCellStyle)style
65
67
self.textLabel .font = [MDCTypography subheadFont ];
66
68
self.textLabel .textColor = bookmark_utils_ios::darkTextColor ();
67
69
self.selectionStyle = UITableViewCellSelectionStyleGray;
68
- self.imageView .image = [UIImage imageNamed: @" bookmark_gray_folder" ];
70
+ self.imageView .image =
71
+ [UIImage imageNamed: [[self class ] bookmarkFolderImageName ]];
69
72
self.accessibilityTraits |= UIAccessibilityTraitButton;
70
73
_enabled = YES ;
71
74
}
@@ -113,4 +116,15 @@ - (void)prepareForReuse {
113
116
self.enabled = YES ;
114
117
}
115
118
119
+ #pragma mark - Private
120
+
121
+ // TODO(crbug.com/695749): Remove this function and use bookmark_gray_folder
122
+ // only when the new folder picker (and its folder cell class) is created for
123
+ // the new ui.
124
+ + (NSString *)bookmarkFolderImageName {
125
+ return (base::FeatureList::IsEnabled (kBookmarkNewGeneration ))
126
+ ? @" bookmark_gray_folder_new"
127
+ : @" bookmark_gray_folder" ;
128
+ }
129
+
116
130
@end
0 commit comments