Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenMushroomNew committed Apr 28, 2021
1 parent a0ffb0e commit 8f372ee
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- 浏览历史增加搜索
- 楼层回复增加查看主题贴
- 长按下载保存全部图片
- 长按关注的人设置备注名(仅支持 12.4.8.2 及以前版本)
- 长按关注的人设置备注名(仅支持 12.4.8.15 及以前版本)
- 自动签到
- 更新时清理缓存
- 自动查看原图
Expand All @@ -30,9 +30,13 @@
- 用赞踩差数代替赞数
- 交换吧热门与最新

## 项目地址

[https://github.com/GuhDoy/TiebaTS](https://github.com/GuhDoy/TiebaTS)

## 特别鸣谢

详见[LicenseActivity.java](https://github.com/GuhDoy/TiebaTS/blob/main/app/src/main/java/gm/tieba/tabswitch/ui/LicenseActivity.java)
详见[LicenseActivity.java](https://github.com/GuhDoy/TiebaTS/blob/full/app/src/main/java/gm/tieba/tabswitch/ui/LicenseActivity.java)

## 下载

Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdkVersion 23
targetSdkVersion 30
versionCode 11
versionName "2.5-beta"
versionName "2.5"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled false
}
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/gm/tieba/tabswitch/XposedInit.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
if (!(param.args[0] instanceof Application)) return;
Context context = ((Application) param.args[0]).getApplicationContext();
Preferences.init(context);

try {
Rule.init(context);
List<String> lostList = AntiConfusionHelper.getRulesLost();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gm.tieba.tabswitch.hooker;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
Expand Down Expand Up @@ -45,6 +46,7 @@ public void hook() throws Throwable {
for (Method method : sClassLoader.loadClass("com.baidu.tieba.LogoActivity").getDeclaredMethods()) {
if (!method.getName().startsWith("on") && Arrays.toString(method.getParameterTypes()).equals("[class android.os.Bundle]")) {
XposedBridge.hookMethod(method, new XC_MethodReplacement() {
@SuppressLint({"ApplySharedPref", "SetTextI18n"})
@Override
protected Object replaceHookedMethod(MethodHookParam param) throws Throwable {
Activity activity = (Activity) param.thisObject;
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/gm/tieba/tabswitch/hooker/PurifyMy.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ protected void afterHookedMethod(XC_MethodHook.MethodHookParam param) throws Thr
field.setAccessible(true);
if (field.get(param.thisObject) instanceof ArrayList) {
ArrayList<?> arrayList = (ArrayList<?>) field.get(param.thisObject);
if (arrayList == null) continue;
for (int i = 0; i < arrayList.size(); i++) {
try {
Reflect.getObjectField(arrayList.get(i), "com.baidu.tbadk.core.data.UserData");
Expand All @@ -86,11 +87,10 @@ protected void afterHookedMethod(XC_MethodHook.MethodHookParam param) throws Thr
field2.setAccessible(true);
if (field2.get(arrayList.get(i)) instanceof String) {
String type = (String) field2.get(arrayList.get(i));
if (type == null) continue;
if (!type.startsWith("http") &&
!type.equals("我的收藏") &&
!type.equals("浏览历史") &&
!type.equals("服务中心")) {
if (type != null && !type.startsWith("http")
&& !type.equals("我的收藏")
&& !type.equals("浏览历史")
&& !type.equals("服务中心")) {
arrayList.remove(i);
i--;
}
Expand Down

0 comments on commit 8f372ee

Please sign in to comment.