Skip to content

Commit 3b92a6c

Browse files
committed
bugfix
1 parent cf0831f commit 3b92a6c

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

Coding_iOS/Controllers/TipsViewController.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
@interface TipsViewController ()
2525
@property (nonatomic, strong) UITableView *myTableView;
2626
@property (nonatomic, strong) ODRefreshControl *refreshControl;
27-
@property (strong, nonatomic) NSNumber *unreadCount;
2827
@end
2928

3029
@implementation TipsViewController
@@ -58,15 +57,12 @@ - (void)loadView{
5857
switch (self.myCodingTips.type) {
5958
case 0:
6059
titleStr = @"@我的";
61-
self.unreadCount = [_notificationDict objectForKey:kUnReadKey_notification_AT];
6260
break;
6361
case 1:
6462
titleStr = @"评论";
65-
self.unreadCount = [_notificationDict objectForKey:kUnReadKey_notification_Comment];
6663
break;
6764
case 2:
6865
titleStr = @"系统通知";
69-
self.unreadCount = [_notificationDict objectForKey:kUnReadKey_notification_System];
7066
break;
7167
default:
7268
break;
@@ -156,7 +152,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
156152
CodingTipCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier_CodingTip forIndexPath:indexPath];
157153
CodingTip *tip = [_myCodingTips.list objectAtIndex:indexPath.row];
158154
cell.curTip = tip;
159-
cell.hasBeenRead = indexPath.row >= self.unreadCount.integerValue;
160155
__weak typeof(self) weakSelf = self;
161156
cell.linkClickedBlock = ^(HtmlMediaItem *item, CodingTip *tip){
162157
[weakSelf analyseHtmlMediaItem:item andTip:tip];

Coding_iOS/Views/Cell/CodingTipCell.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
@interface CodingTipCell : UITableViewCell<TTTAttributedLabelDelegate>
1313
@property (strong, nonatomic) UITTTAttributedLabel *contentLabel;
1414
@property (strong, nonatomic) CodingTip *curTip;
15-
@property (assign, nonatomic) BOOL hasBeenRead;
1615
@property (copy, nonatomic) void(^linkClickedBlock)(HtmlMediaItem *item, CodingTip *tip);
1716
+ (CGFloat)cellHeightWithObj:(id)obj;
1817

Coding_iOS/Views/Cell/CodingTipCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ - (void)layoutSubviews{
5454
if (!_curTip) {
5555
return;
5656
}
57-
_contentLabel.textColor = [UIColor colorWithHexString:_hasBeenRead? @"0x999999" :@"0x222222"];
57+
_contentLabel.textColor = [UIColor colorWithHexString:_curTip.status.boolValue? @"0x999999" :@"0x222222"];
5858

5959
CGFloat curBottomY = 10;
6060
_iconView.image = [UIImage imageNamed:[NSString stringWithFormat:@"tipIcon_%@", _curTip.target_type]];

0 commit comments

Comments
 (0)