修复了一些 UI 问题, 1、2、4、5、12 https://gitlab.ghzhushou.com/pm/halo-app-issues/issues/385

This commit is contained in:
chenjuntao
2018-10-31 05:15:28 +08:00
parent e80af77b8d
commit 2c5a21ec2a
7 changed files with 25 additions and 9 deletions

View File

@ -545,12 +545,22 @@ public class MessageDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
// 往位置0添加评论
public void addNormalComment(CommentEntity commentEntity) {
mNormalCommentList.add(0, commentEntity);
mNormalCommentList.add(findTheLastPriorComment(), commentEntity);
}
public void addCommentCount() {
mConcernEntity.setCommentnum(mConcernEntity.getCommentnum() + 1);
notifyItemChanged(0);
mConcernEntity.setCommentnum(mConcernEntity.getCommentnum());
notifyDataSetChanged();
}
public int findTheLastPriorComment() {
int lastPriorityPosition = 0;
for (int i = 0; i < mNormalCommentList.size(); i++) {
if (mNormalCommentList.get(i).getPriority() != 0) {
lastPriorityPosition = i + 1;
}
}
return lastPriorityPosition;
}
public int getHotCommentListSize() {