@@ -204,31 +204,14 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
204204 switch (indexPath.row ) {
205205 case 0 :
206206 [cell setImageStr: @" project_item_readme" andTitle: @" README" ];
207- if ([[FunctionTipsManager shareManager ] needToTip: kFunctionTipStr_ReadMe ]) {
208- [cell addTipIcon ];
209- }
210207 break ;
211208 default :
212209 [cell setImageStr: @" project_item_mr_pr" andTitle: _myProject.is_public.boolValue? @" Pull Request" : @" Merge Request" ];
213- if ((_myProject.is_public .boolValue &&
214- [[FunctionTipsManager shareManager ] needToTip: kFunctionTipStr_PR ]) ||
215- (!_myProject.is_public .boolValue &&
216- [[FunctionTipsManager shareManager ] needToTip: kFunctionTipStr_MR ])) {
217- [cell addTipIcon ];
218- }else
219210 break ;
220211 }
221212 }
222213 FunctionTipsManager *ftm = [FunctionTipsManager shareManager ];
223- NSString *tipStr;
224- if (indexPath.section == 1 ) {
225- if ((_myProject.is_public .boolValue && indexPath.row == 2 ) ||
226- (!_myProject.is_public .boolValue && indexPath.row == 4 )) {
227- tipStr = kFunctionTipStr_CommitList ;
228- }
229- }else if (indexPath.section == 2 ){
230- tipStr = indexPath.row == 0 ? kFunctionTipStr_ReadMe : _myProject.is_public .boolValue ? kFunctionTipStr_PR : kFunctionTipStr_MR ;
231- }
214+ NSString *tipStr = [self p_TipStrForIndexPath: indexPath];
232215 if (tipStr && [ftm needToTip: tipStr]) {
233216 [cell addTipIcon ];
234217 }
@@ -270,13 +253,26 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
270253 }
271254
272255 FunctionTipsManager *ftm = [FunctionTipsManager shareManager ];
273- NSString *tipStr;
274- if (indexPath.section == 2 ) {
275- tipStr = indexPath.row == 0 ? kFunctionTipStr_ReadMe : _myProject.is_public .boolValue ? kFunctionTipStr_PR : kFunctionTipStr_MR ;
276- }
256+ NSString *tipStr = [self p_TipStrForIndexPath: indexPath];
277257 if (tipStr && [ftm needToTip: tipStr]) {
278258 [ftm markTiped: tipStr];
259+ NProjectItemCell *cell = (NProjectItemCell *)[tableView cellForRowAtIndexPath: indexPath];
260+ [cell removeTip ];
261+ }
262+ }
263+
264+ - (NSString *)p_TipStrForIndexPath : (NSIndexPath *)indexPath {
265+ NSString *tipStr = nil ;
266+ if (indexPath.section == 1 ) {
267+ if (!_myProject.is_public .boolValue && indexPath.row == 3 ) {
268+ tipStr = kFunctionTipStr_File_2V ;
269+ }
270+ }else if (indexPath.section == 2 ){
271+ if (indexPath.row == 1 ) {
272+ tipStr = kFunctionTipStr_LineNote_MRPR ;
273+ }
279274 }
275+ return tipStr;
280276}
281277
282278#pragma mark goTo VC
0 commit comments