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

Commit

Permalink
fix: removing top_level_navi causes various visual issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mkx173 committed Apr 4, 2024
1 parent 3e435a9 commit eda7e56
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ private LinearLayout createRootPreference(final Activity activity) {
}
preferenceLayout.addView(new SwitchButtonHolder(activity, "净化进吧", "purge_enter", SwitchButtonHolder.TYPE_SWITCH));
preferenceLayout.addView(new SwitchButtonHolder(activity, "净化我的", "purge_my", SwitchButtonHolder.TYPE_SWITCH));
preferenceLayout.addView(new SwitchButtonHolder(activity, "净化置顶帖", "fold_top_card_view", SwitchButtonHolder.TYPE_SWITCH));
preferenceLayout.addView(new SwitchButtonHolder(activity, "默认折叠置顶帖", "fold_top_card_view", SwitchButtonHolder.TYPE_SWITCH));
preferenceLayout.addView(new SwitchButtonHolder(activity, "只推荐已关注的吧", "follow_filter", SwitchButtonHolder.TYPE_SWITCH));
preferenceLayout.addView(new SwitchButtonHolder(activity, "屏蔽首页视频贴", "purge_video", SwitchButtonHolder.TYPE_SWITCH));
preferenceLayout.addView(new SwitchButtonHolder(activity, "过滤首页推荐", "personalized_filter", SwitchButtonHolder.TYPE_DIALOG));
Expand Down
24 changes: 12 additions & 12 deletions app/src/main/java/gm/tieba/tabswitch/hooker/eliminate/Purge.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public List<? extends Matcher> matchers() {
new StringMatcher("准备展示精灵动画提示控件"),
new StringMatcher("TbChannelJsInterfaceNew"),
new StringMatcher("bottom_bubble_config"),
new StringMatcher("top_level_navi"),
// new StringMatcher("top_level_navi"),
new StringMatcher("index_tab_info"),
new SmaliMatcher("Lcom/baidu/tbadk/coreExtra/floatCardView/AlaLiveTipView;-><init>(Landroid/content/Context;)V"),
new SmaliMatcher("Lcom/baidu/tbadk/editortools/meme/pan/SpriteMemePan;-><init>(Landroid/content/Context;)V"),
Expand Down Expand Up @@ -100,17 +100,17 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
});
}
break;
case "top_level_navi": // 首页活动背景
if (method.equals("invoke")) {
XposedHelpers.findAndHookMethod(clazz, sClassLoader, method, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
JSONObject syncData = ReflectUtils.getObjectField(param.thisObject, JSONObject.class);
syncData.put("top_level_navi", null);
}
});
}
break;
// case "top_level_navi": // 首页活动背景
// if (method.equals("invoke")) {
// XposedHelpers.findAndHookMethod(clazz, sClassLoader, method, new XC_MethodHook() {
// @Override
// protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
// JSONObject syncData = ReflectUtils.getObjectField(param.thisObject, JSONObject.class);
// syncData.put("top_level_navi", null);
// }
// });
// }
// break;
case "index_tab_info": // 首页活动Tab (202), 直播Tab (6)
if (method.equals("invoke")) {
XposedHelpers.findAndHookMethod(clazz, sClassLoader, method, new XC_MethodHook() {
Expand Down

0 comments on commit eda7e56

Please sign in to comment.