Skip to content

Commit 38ec5ab

Browse files
committed
讨论 - 评论正序排列。。最多显示 6 条
1 parent 6f98a54 commit 38ec5ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Coding_iOS/Models/ProjectTopic.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ - (void)configWithComment:(ProjectTopic *)comment andAnswer:(ProjectTopic *)answ
168168
{
169169
if (answer) {
170170
if (answer.child_comments) {
171-
[answer.child_comments insertObject:comment atIndex:0];
171+
[answer.child_comments addObject:comment];
172172
answer.child_count = @(answer.child_count.integerValue + 1);
173173
}else{
174174
answer.child_comments = @[comment].mutableCopy;
@@ -199,7 +199,7 @@ - (BOOL)canEdit
199199
[Login isLoginUserGlobalKey:self.project.owner_user_name]);// 项目创建者
200200
}
201201
- (NSInteger)commentsDisplayNum{
202-
return MIN(_child_comments.count, 2);
202+
return MIN(_child_comments.count, 6);
203203
}
204204
- (void)change_is_up_voted{
205205
_is_up_voted = @(!self.is_up_voted.boolValue);

0 commit comments

Comments
 (0)