Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7ed2f96

Browse filesBrowse files
committed
对任务提醒的 Tip 做下特殊处理
1 parent 6017b85 commit 7ed2f96
Copy full SHA for 7ed2f96

File tree

Expand file treeCollapse file tree

2 files changed

+10
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-2
lines changed
Open diff view settings
Collapse file

‎Coding_iOS/Models/CodingTip.m‎

Copy file name to clipboardExpand all lines: Coding_iOS/Models/CodingTip.m
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,16 @@ - (void)setTarget_type:(NSString *)target_type{
3030

3131
- (void)adjust{
3232
//根据 content、target_type 去重组数据
33-
if ([_target_type isEqualToString:@"Depot"]) {//您导入的仓库(xxx)成功。点击查看:<a>playmore</a>
33+
if (_htmlMedia.mediaItems.count > 1) {
34+
_user_item = [_htmlMedia.mediaItems firstObject];
35+
[_htmlMedia removeItem:_user_item];
36+
}else if ([_target_type isEqualToString:@"Depot"]) {//您导入的仓库(xxx)成功。点击查看:<a>playmore</a>
3437
_user_item = [HtmlMediaItem htmlMediaItemWithTypeATUser:[Login curLoginUser] mediaRange:NSMakeRange(0, 0)];
35-
}else if (_htmlMedia.mediaItems.count > 0) {
38+
}else if ([_target_type isEqualToString:@"Task"]){//早上好,今天您有7个任务已超期
39+
_user_item = [HtmlMediaItem htmlMediaItemWithType:HtmlMediaItemType_CustomLink];
40+
_user_item.linkStr = @"任务提醒";
41+
_user_item.href = [(HtmlMediaItem *)_htmlMedia.mediaItems.lastObject href];
42+
}else{
3643
_user_item = [_htmlMedia.mediaItems firstObject];
3744
[_htmlMedia removeItem:_user_item];
3845
}
Collapse file

‎Coding_iOS/Views/Cell/CodingTipCell.m‎

Copy file name to clipboardExpand all lines: Coding_iOS/Views/Cell/CodingTipCell.m
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ - (void)setCurTip:(CodingTip *)curTip{
123123
// NSString *username_first = pinyin.length > 0? [[pinyin substringToIndex:1] uppercaseString]: @"C";
124124
// _ownerL.text = username_first;
125125
//owner姓名
126+
[self.ownerNameBtn setTitleColor:[UIColor colorWithHexString:curTip.user_item.type != HtmlMediaItemType_CustomLink? @"0x3bbd79": @"0x222222"] forState:UIControlStateNormal];
126127
[self.ownerNameBtn setUserTitle:userName font:[UIFont systemFontOfSize:17] maxWidth:(kCodingTipCell_WidthContent -80)];
127128
//时间
128129
// _timeLabel.text = _curTip.target_type;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.