Skip to content

Commit

Permalink
chore: better toast
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonLeeeaf committed Jun 8, 2024
1 parent 9543727 commit 05f2d39
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
27 changes: 6 additions & 21 deletions .androidide/editor/openedFiles.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
{
"allFiles": [
{
"file": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/src/main/res/xml/config.xml",
"selection": {
"end": {
"column": 102,
"index": 683,
"line": 19
},
"start": {
"column": 102,
"index": 683,
"line": 19
}
}
},
{
"file": "/storage/emulated/0/铃芽の文件/Projects/FuckMaoNemo/app/src/main/java/io/github/moonleeeaf/fuckmaonemo/Hook.java",
"selection": {
"end": {
"column": 31,
"index": 3660,
"line": 84
"column": 51,
"index": 3944,
"line": 90
},
"start": {
"column": 31,
"index": 3660,
"line": 84
"column": 51,
"index": 3944,
"line": 90
}
}
}
Expand Down
11 changes: 10 additions & 1 deletion app/src/main/java/io/github/moonleeeaf/fuckmaonemo/Hook.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,16 @@ protected void beforeHookedMethod(MethodHookParam mP) throws Throwable {
XposedHelpers.setIntField(rawRes, "code", 200);
XposedBridge.log("[FuckMaoNemo] 拦截响应 " + code + " 码");
String t = "响应码 " + code;
// Toast.makeText(getApplication(), "[FuckMaoNemo] " + t, Toast.LENGTH_SHORT).show();
switch (code) {
case 401:
t = "已阻止异常登出";
break;
case 405:
case 422:
t = "API 访问被拒绝,评论区或者已封禁账号?";
break;
}
Toast.makeText(getApplication(), "[FuckMaoNemo] " + t, Toast.LENGTH_SHORT).show();
}
}
}
Expand Down

0 comments on commit 05f2d39

Please sign in to comment.