Skip to content

Commit e6989ab

Browse files
committed
删掉一些没用的提示判断
1 parent 0842fd3 commit e6989ab

11 files changed

Lines changed: 26 additions & 131 deletions

File tree

Coding_iOS/Controllers/FileViewController.m

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,6 @@ - (EaseToolBar *)myToolBar{
7373
make.size.mas_equalTo(_myToolBar.frame.size);
7474
}];
7575
}
76-
if (_myToolBar) {
77-
FunctionTipsManager *ftM = [FunctionTipsManager shareManager];
78-
if ([ftM needToTip:kFunctionTipStr_File_2V_Activity]) {
79-
EaseToolBarItem *item = [_myToolBar itemOfIndex:0];
80-
[item addTipIcon];
81-
}
82-
if ([ftM needToTip:kFunctionTipStr_File_2V_Version]) {
83-
EaseToolBarItem *item = [_myToolBar itemOfIndex:1];
84-
[item addTipIcon];
85-
}
86-
}
8776
return _myToolBar;
8877
}
8978

@@ -511,20 +500,12 @@ - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
511500

512501
#pragma mark EaseToolBarDelegate
513502
- (void)easeToolBar:(EaseToolBar *)toolBar didClickedIndex:(NSInteger)index{
514-
EaseToolBarItem *item = [toolBar itemOfIndex:index];
515-
NSString *tipStr = nil;
516503
if (index == 0) {
517504
FileActivitiesViewController *vc = [FileActivitiesViewController vcWithFile:_curFile];
518505
[self.navigationController pushViewController:vc animated:YES];
519-
tipStr = kFunctionTipStr_File_2V_Activity;
520506
}else if (index == 1){
521507
FileVersionsViewController *vc = [FileVersionsViewController vcWithFile:_curFile];
522508
[self.navigationController pushViewController:vc animated:YES];
523-
tipStr = kFunctionTipStr_File_2V_Version;
524-
}
525-
if ([[FunctionTipsManager shareManager] needToTip:tipStr]) {
526-
[[FunctionTipsManager shareManager] markTiped:tipStr];
527-
[item removeTipIcon];
528509
}
529510
}
530511
#pragma mark Data Value

Coding_iOS/Controllers/MRDetailViewController.m

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
496496
[cell setImageStr:@"mrpr_icon_commit" andTitle:@"提交记录"];
497497
}else if(indexPath.row == 1){
498498
[cell setImageStr:@"mrpr_icon_fileChange" andTitle:@"文件改动"];
499-
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_LineNote_FileChange]) {
500-
[cell addTipIcon];
501-
}
502499
} else {
503500
[cell setImageStr:@"PR_TaskResource" andTitle:@"关联资源"];
504501
if(self.resourceReference.itemList.count > 0) {
@@ -543,9 +540,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
543540
[tmpReviewers addObject:self.curReviewersInfo.volunteer_reviewers[i]];
544541
}
545542
[cell initCellWithReviewers:tmpReviewers];
546-
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_LineNote_FileChange]) {
547-
[cell addTipHeadIcon:@"PointLikeHead"];
548-
}
549543
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:50];
550544
return cell;
551545
}
@@ -656,12 +650,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
656650
vc.curMRPRInfo = _curMRPRInfo;
657651
vc.curProject = _curProject;
658652
[self.navigationController pushViewController:vc animated:YES];
659-
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_LineNote_FileChange]) {
660-
[[FunctionTipsManager shareManager] markTiped:kFunctionTipStr_LineNote_FileChange];
661-
[[FunctionTipsManager shareManager] markTiped:kFunctionTipStr_LineNote_MRPR];
662-
NProjectItemCell *cell = (NProjectItemCell *)[tableView cellForRowAtIndexPath:indexPath];
663-
[cell removeTip];
664-
}
665653
} else {
666654
TaskResourceReferenceViewController *vc = [TaskResourceReferenceViewController new];
667655
vc.resourceReference = self.resourceReference;
@@ -815,4 +803,4 @@ - (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithTransitInfo
815803
}
816804

817805

818-
@end
806+
@end

Coding_iOS/Controllers/NProjectViewController/NProjectViewController.m

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
284284

285285
- (NSString *)p_TipStrForIndexPath:(NSIndexPath *)indexPath{
286286
NSString *tipStr = nil;
287-
if (indexPath.section == 1) {
288-
if (!_myProject.is_public.boolValue && indexPath.row == 3) {
289-
tipStr = kFunctionTipStr_File_3V;
290-
}
291-
}else if (indexPath.section == 2){
292-
if (indexPath.row == 1) {
293-
tipStr = kFunctionTipStr_LineNote_MRPR;
294-
}
295-
}
296287
return tipStr;
297288
}
298289

Coding_iOS/Controllers/PRDetailViewController.m

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
295295
[cell setImageStr:@"mrpr_icon_commit" andTitle:@"提交记录"];
296296
}else{
297297
[cell setImageStr:@"mrpr_icon_fileChange" andTitle:@"文件改动"];
298-
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_LineNote_FileChange]) {
299-
[cell addTipIcon];
300-
}
301298
}
302299
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:50];
303300
return cell;
@@ -347,12 +344,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
347344
vc.curMRPRInfo = _curMRPRInfo;
348345
vc.curProject = _curProject;
349346
[self.navigationController pushViewController:vc animated:YES];
350-
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_LineNote_FileChange]) {
351-
[[FunctionTipsManager shareManager] markTiped:kFunctionTipStr_LineNote_FileChange];
352-
[[FunctionTipsManager shareManager] markTiped:kFunctionTipStr_LineNote_MRPR];
353-
NProjectItemCell *cell = (NProjectItemCell *)[tableView cellForRowAtIndexPath:indexPath];
354-
[cell removeTip];
355-
}
356347
}
357348
}else if (_curMRPRInfo.discussions.count > 0 && indexPath.section == 2){//Comment
358349
ProjectLineNote *curCommentItem = [[_curMRPRInfo.discussions objectAtIndex:indexPath.row] firstObject];
@@ -449,4 +440,4 @@ - (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithTransitInfo
449440
HtmlMediaItem *clickedItem = [components objectForKey:@"value"];
450441
[self analyseLinkStr:clickedItem.href];
451442
}
452-
@end
443+
@end

Coding_iOS/Controllers/ProjectViewController.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ - (void)configRightBarButtonItemWithViewType:(ProjectViewType)viewType{
153153
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
154154
[button setImage:[UIImage imageNamed:@"timeBtn_Nav"] forState:UIControlStateNormal];
155155
[button addTarget:self action:@selector(navRightBtnClicked) forControlEvents:UIControlEventTouchUpInside];
156-
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_CommitList]) {
157-
[button addBadgeTip:kBadgeTipStr withCenterPosition:CGPointMake(20, 0)];
158-
}
159156
navRightBtn = [[UIBarButtonItem alloc] initWithCustomView:button];
160157
}
161158
[self.navigationItem setRightBarButtonItem:navRightBtn animated:YES];
@@ -575,10 +572,6 @@ - (void)navRightBtnClicked{
575572
break;
576573
case ProjectViewTypeCodes:
577574
{
578-
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_CommitList]) {
579-
[[FunctionTipsManager shareManager] markTiped:kFunctionTipStr_CommitList];
580-
[self configRightBarButtonItemWithViewType:ProjectViewTypeCodes];
581-
}
582575
//代码提交记录
583576
ProjectCommitsViewController *vc = [ProjectCommitsViewController new];
584577
vc.curProject = self.myProject;

Coding_iOS/Controllers/RootControllers/Tweet_RootViewController.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,7 @@ - (void)viewWillDisappear:(BOOL)animated{
148148

149149
- (void)viewDidAppear:(BOOL)animated{
150150
[super viewDidAppear:animated];
151-
152-
UIButton *leftItemView = (UIButton *)self.parentViewController.navigationItem.leftBarButtonItem.customView;
153-
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_Search]) {
154-
[leftItemView addBadgePoint:4 withPointPosition:CGPointMake(25, 0)];
155-
}
156-
157151
[self refreshFirst];
158-
159152
// 键盘
160153
if (_myMsgInputView) {
161154
[_myMsgInputView prepareToShow];

Coding_iOS/Util/Manager/FunctionTipsManager.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@
66
// Copyright (c) 2015年 Coding. All rights reserved.
77
//
88

9-
//version: 3.0
10-
static NSString *kFunctionTipStr_MR = @"MergeRequest";
11-
static NSString *kFunctionTipStr_PR = @"PullRequest";
12-
static NSString *kFunctionTipStr_ReadMe = @"ReadMe";
13-
static NSString *kFunctionTipStr_CommitList = @"Code_CommitList";
14-
//version: 3.1.5
15-
static NSString *kFunctionTipStr_Search = @"hasSearch";
16-
static NSString *kFunctionTipStr_HotTopic = @"HotTopic";
17-
static NSString *kFunctionTipStr_TweetTopic = @"TweetTopic";
18-
//version: 3.2
19-
static NSString *kFunctionTipStr_VoiceMessage = @"VoiceMessage";
20-
static NSString *kFunctionTipStr_File_2V = @"File_2V";
21-
static NSString *kFunctionTipStr_File_2V_Version = @"File_2V_Version";
22-
static NSString *kFunctionTipStr_File_2V_Activity = @"File_2V_Activity";
23-
static NSString *kFunctionTipStr_LineNote_FileChange = @"LineNote_FileChange";
24-
static NSString *kFunctionTipStr_LineNote_MRPR = @"LineNote_MRPR";
25-
static NSString *kFunctionTipStr_Me_Points = @"Me_Points";
26-
//version: 3.7
27-
static NSString *kFunctionTipStr_Prefix = @"Prefix";
28-
//version 4.0.8
29-
static NSString *kFunctionTipStr_File_3V = @"File_3V";
9+
////version: 3.0
10+
//static NSString *kFunctionTipStr_MR = @"MergeRequest";
11+
//static NSString *kFunctionTipStr_PR = @"PullRequest";
12+
//static NSString *kFunctionTipStr_ReadMe = @"ReadMe";
13+
//static NSString *kFunctionTipStr_CommitList = @"Code_CommitList";
14+
////version: 3.1.5
15+
//static NSString *kFunctionTipStr_Search = @"hasSearch";
16+
//static NSString *kFunctionTipStr_HotTopic = @"HotTopic";
17+
//static NSString *kFunctionTipStr_TweetTopic = @"TweetTopic";
18+
////version: 3.2
19+
//static NSString *kFunctionTipStr_VoiceMessage = @"VoiceMessage";
20+
//static NSString *kFunctionTipStr_File_2V = @"File_2V";
21+
//static NSString *kFunctionTipStr_File_2V_Version = @"File_2V_Version";
22+
//static NSString *kFunctionTipStr_File_2V_Activity = @"File_2V_Activity";
23+
//static NSString *kFunctionTipStr_LineNote_FileChange = @"LineNote_FileChange";
24+
//static NSString *kFunctionTipStr_LineNote_MRPR = @"LineNote_MRPR";
25+
//static NSString *kFunctionTipStr_Me_Points = @"Me_Points";
26+
////version: 3.7
27+
static NSString *kFunctionTipStr_StartLinkPrefix = @"StartLinkPrefix";
28+
////version 4.0.8
29+
//static NSString *kFunctionTipStr_File_3V = @"File_3V";
3030

3131
#import <Foundation/Foundation.h>
3232

Coding_iOS/Util/Manager/FunctionTipsManager.m

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,7 @@ - (instancetype)init
3232
if (![[_tipsDict valueForKey:@"version"] isEqualToString:kVersionBuild_Coding]) {
3333
_tipsDict = [@{kFunctionTipStr_Version: kVersionBuild_Coding,
3434
//Function Need To Tip
35-
kFunctionTipStr_File_3V: @(YES),
36-
// kFunctionTipStr_MR: @(YES),
37-
// kFunctionTipStr_PR: @(YES),
38-
// kFunctionTipStr_ReadMe: @(YES),
39-
// kFunctionTipStr_CommitList: @(YES),
40-
// kFunctionTipStr_Search: @(YES),
41-
// kFunctionTipStr_HotTopic: @(YES),
42-
// kFunctionTipStr_TweetTopic: @(YES),
43-
// kFunctionTipStr_VoiceMessage: @(YES),
44-
// kFunctionTipStr_File_2V: @(YES),
45-
// kFunctionTipStr_File_2V_Activity: @(YES),
46-
// kFunctionTipStr_File_2V_Version: @(YES),
47-
// kFunctionTipStr_LineNote_MRPR: @(YES),
48-
// kFunctionTipStr_LineNote_FileChange: @(YES),
49-
// kFunctionTipStr_Me_Points: @(YES),
35+
// kFunctionTipStr_File_3V: @(YES),
5036
} mutableCopy];
5137
[_tipsDict writeToFile:[self p_cacheFilePath] atomically:YES];
5238
}
@@ -64,7 +50,7 @@ - (NSString *)p_cacheFilePath{
6450
- (BOOL)needToTip:(NSString *)functionStr{
6551
NSNumber *needToTip = [_tipsDict valueForKey:functionStr];
6652
if (!needToTip) {
67-
return [functionStr hasPrefix:kFunctionTipStr_Prefix];
53+
return [functionStr hasPrefix:kFunctionTipStr_StartLinkPrefix];
6854
}else{
6955
return needToTip.boolValue;
7056
}

Coding_iOS/Util/Manager/StartImagesManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ - (void)handleStartLink{
9494
return;
9595
}
9696
NSString *global_key = [Login curLoginUser].global_key;
97-
NSString *tipKey = [NSString stringWithFormat:@"%@_%@_%@", kFunctionTipStr_Prefix, global_key, link];
97+
NSString *tipKey = [NSString stringWithFormat:@"%@_%@_%@", kFunctionTipStr_StartLinkPrefix, global_key, link];
9898
if (![[FunctionTipsManager shareManager] needToTip:tipKey]) {
9999
return;
100100
}

Coding_iOS/Views/Cell/TweetSendTextCell.m

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@ - (UIView *)keyboardToolBar{
121121

122122
UIButton *atButton = [self toolButtonWithToolBarFrame:keyboardToolBar.frame index:3 imageStr:@"keyboard_at" andSelecter:@selector(atButtonClicked:)];
123123
[keyboardToolBar addSubview:atButton];
124-
125-
126-
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_TweetTopic]) {
127-
[topicButton addBadgePoint:4 withPointPosition:CGPointMake(27, 7)];
128-
}
129124
}
130125

131126
[_footerToolBar addSubview:keyboardToolBar];
@@ -198,13 +193,6 @@ - (void)atButtonClicked:(id)sender{
198193

199194
- (void)topicButtonClicked:(id)sender{
200195
[MobClick event:kUmeng_Event_Request_ActionOfLocal label:@"冒泡_添加_话题"];
201-
202-
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_TweetTopic]) {
203-
[[FunctionTipsManager shareManager] markTiped:kFunctionTipStr_TweetTopic];
204-
UIButton *btnTopic = (UIButton *)sender;
205-
[btnTopic removeBadgePoint];
206-
}
207-
208196
@weakify(self);
209197
[CSTopicCreateVC showATSomeoneWithBlock:^(NSString *topicName) {
210198
@strongify(self);

0 commit comments

Comments
 (0)