修复点赞数量为零的情况,社区投票 已开通的toast文案修改
This commit is contained in:
@ -12,8 +12,7 @@ data class FollowersOrFansEntity(
|
||||
val auth: Auth = Auth()) {
|
||||
|
||||
data class Count(
|
||||
@SerializedName("answer_vote")
|
||||
val answerVote: Int = 0,
|
||||
val vote: Int = 0,
|
||||
val answer: Int = 0)
|
||||
|
||||
}
|
||||
|
||||
@ -13,8 +13,6 @@ data class PersonalEntity(
|
||||
val me: MeEntity = MeEntity()) {
|
||||
|
||||
data class Count(
|
||||
@SerializedName("answer_vote")
|
||||
val answerVote: Int = 0,
|
||||
// 包括回答点赞和社区文章点赞
|
||||
val vote: Int? = 0,
|
||||
val answer: Int = 0,
|
||||
|
||||
@ -141,7 +141,7 @@ class PersonalHomeAdapter(context: Context,
|
||||
mContext.startActivity(MyArticleActivity.getIntent(mContext, mListViewModel.userId, "$mEntrance+(个人主页)"))
|
||||
}
|
||||
userVoteContainer.setOnClickListener {
|
||||
Utils.toast(mContext, "共获得 " + entity?.count?.answerVote + " 赞同")
|
||||
Utils.toast(mContext, "共获得 " + entity?.count?.vote + " 赞同")
|
||||
}
|
||||
userConcernOrEdit.setOnClickListener {
|
||||
mContext.ifLogin("个人主页-关注-[关注]") {
|
||||
|
||||
@ -20,6 +20,5 @@ data class InviteEntity(@SerializedName("_id")
|
||||
@SerializedName("is_followers")
|
||||
var isFollowers: Boolean? = false) {
|
||||
data class Count(var answer: Int? = 0,
|
||||
@SerializedName("answer_vote")
|
||||
var answerVote: Int? = 0)
|
||||
var vote: Int? = 0)
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ public class QuestionsInviteViewHolder extends BaseRecyclerViewHolder<InviteEnti
|
||||
|
||||
if (entity.getCount() != null) {
|
||||
mAnswercount.setText(context.getString(R.string.ask_answer_count, NumberUtils.transSimpleCount(entity.getCount().getAnswer())));
|
||||
mVotecount.setText(context.getString(R.string.ask_vote_count, NumberUtils.transSimpleCount(entity.getCount().getAnswerVote())));
|
||||
mVotecount.setText(context.getString(R.string.ask_vote_count, NumberUtils.transSimpleCount(entity.getCount().getVote())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,12 +77,12 @@ public class SelectGameDialogAdapter extends BaseRecyclerAdapter<VotingSelectGam
|
||||
for (GameInstall game : gameList) {
|
||||
if (!TextUtils.isEmpty(game.getId()) &&
|
||||
game.getId().equals(entity.getGame().getId())) {
|
||||
game.setTag("isOpenCommunity");
|
||||
game.setTag(entity.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(gameList, (o1, o2) -> (o2.getTag() + "").compareTo(o1.getTag() + ""));
|
||||
Collections.sort(gameList, (o1, o2) -> (o1.getTag() + "").compareTo(o2.getTag() + ""));
|
||||
|
||||
loadOver();
|
||||
}
|
||||
@ -184,7 +184,7 @@ public class SelectGameDialogAdapter extends BaseRecyclerAdapter<VotingSelectGam
|
||||
|
||||
holder.itemView.setOnClickListener(v -> {
|
||||
if (isGameData && gameList.get(position).getTag() != null) {
|
||||
Utils.toast(mContext, gameList.get(position).getName() + "问答专区已经开通了哦");
|
||||
Utils.toast(mContext, gameList.get(position).getTag() + "问答专区已经开通了哦");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user