|
26 | 26 |
|
27 | 27 | #import "CSSearchVC.h" |
28 | 28 | #import "CSSearchDisplayVC.h" |
| 29 | +#import "FunctionTipsManager.h" |
29 | 30 |
|
30 | 31 | @interface Tweet_RootViewController () <UISearchBarDelegate, UISearchDisplayDelegate> |
31 | 32 | { |
@@ -99,9 +100,7 @@ - (void)viewDidLoad |
99 | 100 | // [self refreshFirst]; |
100 | 101 | // }]; |
101 | 102 |
|
102 | | - BOOL isBadgeValid = ![CSSearchModel hasSearchBadgeShown]; |
103 | | - isBadgeValid = YES; |
104 | | - UIBarButtonItem *leftBarItem =[UIBarButtonItem itemWithIcon:@"search_Nav" showBadge:isBadgeValid target:self action:@selector(searchItemClicked:)]; |
| 103 | + UIBarButtonItem *leftBarItem =[UIBarButtonItem itemWithIcon:@"search_Nav" showBadge:NO target:self action:@selector(searchItemClicked:)]; |
105 | 104 | [self.parentViewController.navigationItem setLeftBarButtonItem:leftBarItem animated:NO]; |
106 | 105 |
|
107 | 106 | _tweetsDict = [[NSMutableDictionary alloc] initWithCapacity:4]; |
@@ -152,13 +151,10 @@ - (void)viewDidAppear:(BOOL)animated{ |
152 | 151 | [super viewDidAppear:animated]; |
153 | 152 |
|
154 | 153 | UIButton *leftItemView = (UIButton *)self.parentViewController.navigationItem.leftBarButtonItem.customView; |
155 | | - if(![CSSearchModel hasClickedNewFeatureWithType:CSSNewFeatureTypeSearch]) { |
156 | | - |
| 154 | + if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_Search]) { |
157 | 155 | [leftItemView addBadgePoint:3 withPointPosition:CGPointMake(35, 10)]; |
158 | 156 | } |
159 | 157 |
|
160 | | -// [leftItemView addBadgePoint:3 withPosition:BadgePositionTypeDefault]; |
161 | | - |
162 | 158 | [self refreshFirst]; |
163 | 159 |
|
164 | 160 | // 键盘 |
@@ -264,10 +260,11 @@ - (void)deleteComment:(Comment *)comment ofTweet:(Tweet *)tweet{ |
264 | 260 | #pragma mark - search |
265 | 261 |
|
266 | 262 | - (void)searchItemClicked:(id)sender{ |
267 | | - |
268 | | - UIButton *leftItemView = (UIButton *)self.parentViewController.navigationItem.leftBarButtonItem.customView; |
269 | | - [CSSearchModel clickNewFeatureWithType:CSSNewFeatureTypeSearch]; |
270 | | - [leftItemView removeBadgePoint]; |
| 263 | + if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_Search]) { |
| 264 | + [[FunctionTipsManager shareManager] markTiped:kFunctionTipStr_Search]; |
| 265 | + UIButton *leftItemView = (UIButton *)self.parentViewController.navigationItem.leftBarButtonItem.customView; |
| 266 | + [leftItemView removeBadgePoint]; |
| 267 | + } |
271 | 268 |
|
272 | 269 | if(!_searchBar) { |
273 | 270 |
|
@@ -303,13 +300,6 @@ - (void)searchItemClicked:(id)sender{ |
303 | 300 | [self hideToolBar:YES]; |
304 | 301 | [_searchBar becomeFirstResponder]; |
305 | 302 |
|
306 | | -// BOOL isBadgeValid = ![CSSearchModel hasSearchBadgeShown]; |
307 | | -// if (isBadgeValid) { |
308 | | -// //存一下 |
309 | | -// [CSSearchModel invalidSearchBadge]; |
310 | | -// UIBarButtonItem *leftBarItem =[UIBarButtonItem itemWithIcon:@"search_Nav" showBadge:NO target:self action:@selector(searchItemClicked:)]; |
311 | | -// [self.navigationItem setLeftBarButtonItem:leftBarItem animated:NO]; |
312 | | -// } |
313 | 303 | } |
314 | 304 |
|
315 | 305 | #pragma mark Refresh M |
|
0 commit comments