光环助手V3.2 DEV(20180415-1700)测试问题汇总

http://gitlab.ghzhushou.com/pm/halo-app-issues/issues/207
This commit is contained in:
kehaoyuan
2018-04-17 15:16:25 +08:00
parent a0737d0010
commit 840eff3cc4
13 changed files with 49 additions and 137 deletions

View File

@ -153,21 +153,15 @@ public class LoginUtils {
if (exception.code() == 403) {
try {
JSONObject errorJson = new JSONObject(exception.response().errorBody().string());
String detail = errorJson.getString("detail");
switch (detail) {
case "too frequent":
Utils.toast(context, R.string.comment_failed_toofrequent);
break;
case "user blocked":
int errorCode = errorJson.getInt("code");
switch (errorCode) {
case 403019:
Utils.toast(context, R.string.comment_failed_userblocked);
break;
case "user banned":
Utils.toast(context, R.string.comment_failed_userbanned);
case 403020:
Utils.toast(context, R.string.comment_failed_toofrequent);
break;
case "article blocked":
Utils.toast(context, R.string.comment_failed_articleblocked);
break;
case "illegal":
case 403021:
Utils.toast(context, R.string.comment_failed_illegal);
break;
default: