Skip to content

Commit

Permalink
1、修复1.0.4版本拦截评论区广告导致无法查看回复的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
nining377 committed Jul 28, 2020
1 parent 03fe6df commit 6d6f00d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.raincat.dolby_beta"
minSdkVersion 14
targetSdkVersion 23
versionCode 104
versionName "1.0.4"
versionCode 105
versionName "1.0.5"
}
buildTypes {
release {
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/com/raincat/dolby_beta/hook/EAPIHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
}
if (modified.contains("\\/api\\/v1\\/content\\/exposure\\/comment\\/banner\\/get")) {
JSONObject jsonObject = new JSONObject(modified);
jsonObject.put("/api/v1/content/exposure/comment/banner/get", "\"code\":200,\"data\":{\"count\":0,\"offset\":999999999,\"records\":[]},\"message\":\"\"");
jsonObject.put("/api/v1/content/exposure/comment/banner/get", "{-\"code-\":200,-\"data-\":{-\"count-\":0,-\"offset-\":999999999,-\"records-\":[]},-\"message-\":-\"-\"}");
modified = jsonObject.toString();
modified = modified.replace("\\\\\\", "");
modified = modified.replace("-\\", "").replace("\"\\/api\\/v1\\/content\\/exposure\\/comment\\/banner\\/get\":\"", "\"\\/api\\/v1\\/content\\/exposure\\/comment\\/banner\\/get\":")
.replace("\"message\":\"\"}\"", "\"message\":\"\"}");
}
} else if (path.contains("point/dailyTask")) {
if (original.contains("200") && !original.contains("msg"))
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

<string name="compatible_appver_key" translatable="false">compatible_appver</string>
<string name="compatible_appver_title">兼容版本</string>
<string name="compatible_appver_summary">4.3.1,6.0.0,6.4.3~7.1.80</string>
<string name="compatible_appver_summary">4.3.1,6.0.0,6.4.3~7.2.10</string>

<string name="github_key" translatable="false">github</string>
<string name="github_title">github源码</string>
Expand Down

0 comments on commit 6d6f00d

Please sign in to comment.