光环助手V4.0.1-评论内容网络错误排查与交互优化(2,3) https://gitlab.ghzs.com/pm/halo-app-issues/-/issues/869

This commit is contained in:
张玉久
2020-05-20 16:52:05 +08:00
parent f5abd7e075
commit ccba561d47
4 changed files with 37 additions and 34 deletions

View File

@ -211,7 +211,7 @@ public class CommentUtils {
final TextView commentLikeCountTv, final ImageView commentLikeIv,
final OnVoteListener listener) {
if (commentLikeCountTv.getCurrentTextColor() == ContextCompat.getColor(context, R.color.theme_font)) {
Utils.toast(context, "已经点过赞啦!");
ToastUtils.INSTANCE.showToast("已经点过赞啦!");
return;
}
commentEntity.setVote(commentEntity.getVote() + 1);
@ -248,7 +248,7 @@ public class CommentUtils {
try {
String detail = new JSONObject(exception.response().errorBody().string()).getString("detail");
if ("voted".equals(detail)) {
Utils.toast(context, "已经点过赞啦!");
ToastUtils.INSTANCE.showToast("已经点过赞啦!");
}
} catch (Exception ex) {
ex.printStackTrace();
@ -277,7 +277,7 @@ public class CommentUtils {
}
CheckLoginUtils.checkLogin(context, entrance, () -> {
if (commentLikeCountTv.getCurrentTextColor() == ContextCompat.getColor(context, R.color.theme_font)) {
Utils.toast(context, "已经点过赞啦!");
ToastUtils.INSTANCE.showToast("已经点过赞啦!");
return;
}
commentEntity.setVote(commentEntity.getVote() + 1);
@ -313,7 +313,7 @@ public class CommentUtils {
try {
String detail = new JSONObject(exception.response().errorBody().string()).getString("detail");
if ("voted".equals(detail)) {
Utils.toast(context, "已经点过赞啦!");
ToastUtils.INSTANCE.showToast("已经点过赞啦!");
}
} catch (Exception ex) {
ex.printStackTrace();
@ -433,7 +433,7 @@ public class CommentUtils {
ClipboardManager cmb = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
cmb.setText(copyContent);
Utils.toast(context, "复制成功");
ToastUtils.INSTANCE.showToast("复制成功");
}