修复回答详情以及评论列表的一些问题 http://gitlab.ghzhushou.com/pm/issues-Inbox/issues/345
This commit is contained in:
@ -439,7 +439,7 @@ public class CommentUtils {
|
||||
if (entity.getVote() == 0) {
|
||||
holder.commentLikeCountTv.setVisibility(View.GONE);
|
||||
} else { // 检查是否已点赞
|
||||
if (userDataEntity != null && userDataEntity.isCommentVoted()) {
|
||||
if (userDataEntity != null && (userDataEntity.isCommentVoted() || userDataEntity.isAnswerCommentVoted())) {
|
||||
holder.commentLikeCountTv.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
|
||||
holder.commentLikeIv.setImageResource(R.drawable.ic_like_select);
|
||||
}
|
||||
|
||||
@ -349,7 +349,7 @@ public class AnswerDetailFragment extends NormalFragment {
|
||||
} else {
|
||||
// 跳转意见反馈
|
||||
SuggestionActivity.startSuggestionActivity(getContext(), 1, "report",
|
||||
"回答举报:(" + mAnswerId + ")");
|
||||
"回答举报(" + mAnswerId + "):");
|
||||
}
|
||||
});
|
||||
item2.setOnClickListener(v -> {
|
||||
@ -481,9 +481,9 @@ public class AnswerDetailFragment extends NormalFragment {
|
||||
}
|
||||
|
||||
if (mDetailEntity.getPublishTime() == mDetailEntity.getUpdateTime()) {
|
||||
mTime.setText(String.format("发布于 %s\n著作权归作者所有@光环助手", NewsUtils.getFormattedTime(mDetailEntity.getPublishTime())));
|
||||
mTime.setText(String.format("发布于 %s", NewsUtils.getFormattedTime(mDetailEntity.getPublishTime())));
|
||||
} else {
|
||||
mTime.setText(String.format("编辑于 %s\n著作权归作者所有@光环助手", NewsUtils.getFormattedTime(mDetailEntity.getUpdateTime())));
|
||||
mTime.setText(String.format("编辑于 %s", NewsUtils.getFormattedTime(mDetailEntity.getUpdateTime())));
|
||||
}
|
||||
|
||||
mAnswerCommentCountTv.setText(String.format("%d 评论", mDetailEntity.getCommentCount()));
|
||||
|
||||
@ -28,6 +28,9 @@ class UserDataEntity : Parcelable {
|
||||
@SerializedName("is_answer_commented")
|
||||
var isAnswerCommented: Boolean = false
|
||||
|
||||
@SerializedName("is_answer_comment_voted")
|
||||
var isAnswerCommentVoted: Boolean = false
|
||||
|
||||
@SerializedName("is_version_requested")
|
||||
var isVersionRequested: Boolean = false
|
||||
|
||||
@ -50,6 +53,7 @@ class UserDataEntity : Parcelable {
|
||||
dest.writeByte(if (this.isAnswerCommented) 1.toByte() else 0.toByte())
|
||||
dest.writeTypedList(this.userDataLibaoList)
|
||||
dest.writeByte(if (this.isAnswerOwn) 1.toByte() else 0.toByte())
|
||||
dest.writeByte(if (this.isAnswerCommentVoted) 1.toByte() else 0.toByte())
|
||||
}
|
||||
|
||||
constructor() {}
|
||||
@ -63,6 +67,7 @@ class UserDataEntity : Parcelable {
|
||||
this.isAnswerCommented = `in`.readByte().toInt() != 0
|
||||
this.userDataLibaoList = `in`.createTypedArrayList(UserDataLibaoEntity.CREATOR)
|
||||
this.isAnswerOwn = `in`.readByte().toInt() != 0
|
||||
this.isAnswerCommentVoted = `in`.readByte().toInt() != 0
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
Reference in New Issue
Block a user