| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 548f8e3 commit 0a7c09d
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -171,7 +171,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N | |||
| 171 | 171 | cell.isAnswer = indexPath.row == 0; | |
| 172 | 172 | cell.projectId = _curTopic.project.id; | |
| 173 | 173 | cell.contentLabel.delegate = self; | |
| 174 | - [tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:kPaddingLeftWidth + (indexPath.row == 0? 0: 40) hasSectionLine:YES]; | ||
| 174 | + [tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:kPaddingLeftWidth + (indexPath.row == 0? 40: 40) hasSectionLine:YES]; | ||
| 175 | 175 | return cell; | |
| 176 | 176 | } | |
| 177 | 177 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -161,7 +161,7 @@ - (void)configWithComments:(ProjectTopics *)comments | |||
| 161 | 161 | ||
| 162 | 162 | - (NSString *)toDoCommentPath | |
| 163 | 163 | { | |
| 164 | - return [NSString stringWithFormat:@"api/project/%d/topic?parent=%d", _project_id.intValue, _id.intValue]; | ||
| 164 | + return [NSString stringWithFormat:@"api/project/%@/topic/%@/comment", _project_id, _id]; | ||
| 165 | 165 | } | |
| 166 | 166 | ||
| 167 | 167 | - (void)configWithComment:(ProjectTopic *)comment andAnswer:(ProjectTopic *)answer | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -84,7 +84,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N | |||
| 84 | 84 | CGFloat leftSpace; | |
| 85 | 85 | if (indexPath.row == 0) { | |
| 86 | 86 | toComment = _curAnswer; | |
| 87 | - leftSpace = [_curAnswer commentsDisplayNum] > 0? kPaddingLeftWidth: kScreen_Width; | ||
| 87 | + leftSpace = [_curAnswer commentsDisplayNum] > 0? kPaddingLeftWidth + 40: kScreen_Width; | ||
| 88 | 88 | }else{ | |
| 89 | 89 | toComment = _curAnswer.child_comments[indexPath.row - 1]; | |
| 90 | 90 | leftSpace = (indexPath.row - 1 == [_curAnswer commentsDisplayNum] - 1)? kScreen_Width: kPaddingLeftWidth + 40; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,7 +53,7 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus | |||
| 53 | 53 | }]; | |
| 54 | 54 | [self.contentView addSubview:_bestAnswerV]; | |
| 55 | 55 | } | |
| 56 | - CGFloat curBottomY = 10; | ||
| 56 | + CGFloat curBottomY = 15; | ||
| 57 | 57 | if (!_ownerIconView) { | |
| 58 | 58 | _ownerIconView = [[UIImageView alloc] initWithFrame:CGRectMake(kPaddingLeftWidth, curBottomY, 33, 33)]; | |
| 59 | 59 | [_ownerIconView doCircleFrame]; | |
@@ -121,7 +121,7 @@ - (void)setToComment:(ProjectTopic *)toComment{ | |||
| 121 | 121 | if (!_toComment) { | |
| 122 | 122 | return; | |
| 123 | 123 | } | |
| 124 | - CGFloat curBottomY = 10; | ||
| 124 | + CGFloat curBottomY = 15; | ||
| 125 | 125 | CGFloat curWidth = kScreen_Width - 40 - 2*kPaddingLeftWidth; | |
| 126 | 126 | ||
| 127 | 127 | _bestAnswerV.hidden = !_toComment.is_recommended.boolValue; | |
@@ -130,7 +130,7 @@ - (void)setToComment:(ProjectTopic *)toComment{ | |||
| 130 | 130 | } | |
| 131 | 131 | ||
| 132 | 132 | _ownerIconView.y = _contentLabel.y = curBottomY; | |
| 133 | - _voteBtn.y = _ownerIconView.bottom + 2; | ||
| 133 | + _voteBtn.y = _ownerIconView.bottom + 5; | ||
| 134 | 134 | [self setVoteCount:_toComment.up_vote_counts isVoted:_toComment.is_up_voted.boolValue]; | |
| 135 | 135 | [_ownerIconView sd_setImageWithURL:[_toComment.owner.avatar urlImageWithCodePathResizeToView:_ownerIconView] placeholderImage:kPlaceholderMonkeyRoundView(_ownerIconView)]; | |
| 136 | 136 | [_contentLabel setLongString:_toComment.content withFitWidth:curWidth]; | |
@@ -140,7 +140,7 @@ - (void)setToComment:(ProjectTopic *)toComment{ | |||
| 140 | 140 | } | |
| 141 | 141 | } | |
| 142 | 142 | ||
| 143 | - curBottomY += [_toComment.content getHeightWithFont:kTopicCommentCell_FontContent constrainedToSize:CGSizeMake(curWidth, CGFLOAT_MAX)] + 5; | ||
| 143 | + curBottomY += [_toComment.content getHeightWithFont:kTopicCommentCell_FontContent constrainedToSize:CGSizeMake(curWidth, CGFLOAT_MAX)] + 10; | ||
| 144 | 144 | ||
| 145 | 145 | NSInteger imagesCount = _toComment.htmlMedia.imageItems.count; | |
| 146 | 146 | if (imagesCount > 0) { | |
@@ -168,9 +168,9 @@ + (CGFloat)cellHeightWithObj:(id)obj{ | |||
| 168 | 168 | if ([obj isKindOfClass:[ProjectTopic class]]) { | |
| 169 | 169 | ProjectTopic *toComment = (ProjectTopic *)obj; | |
| 170 | 170 | CGFloat curWidth = kScreen_Width - 40 - 2*kPaddingLeftWidth; | |
| 171 | - cellHeight += 10 +[toComment.content getHeightWithFont:kTopicCommentCell_FontContent constrainedToSize:CGSizeMake(curWidth, CGFLOAT_MAX)] + 5 +20 +10; | ||
| 171 | + cellHeight += 15 +[toComment.content getHeightWithFont:kTopicCommentCell_FontContent constrainedToSize:CGSizeMake(curWidth, CGFLOAT_MAX)] + 10 +20 +15; | ||
| 172 | 172 | cellHeight += [self imageCollectionViewHeightWithCount:toComment.htmlMedia.imageItems.count]; | |
| 173 | - cellHeight += toComment.is_recommended.boolValue? 25: 0; | ||
| 173 | + cellHeight += toComment.is_recommended.boolValue? 20: 0; | ||
| 174 | 174 | } | |
| 175 | 175 | return cellHeight; | |
| 176 | 176 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments