Skip to content

Commit aaec5be

Browse files
committed
feat(Others): Add option to Show Me tab icon
1 parent be35197 commit aaec5be

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2938,4 +2938,17 @@ public static Field loadGetCurrentPageInHomeField(@NotNull ClassLoader classLoad
29382938
return UnobfuscatorCache.getInstance().getClass(classLoader, ()-> findFirstClassUsingStrings(classLoader,StringMatchType.Contains,"FStatusMedia/mediaDataV2"));
29392939

29402940
}
2941+
2942+
public static Method loadHideMeTabIcon(@NotNull ClassLoader classLoader) throws Exception {
2943+
return UnobfuscatorCache.getInstance().getMethod(classLoader, ()->{
2944+
return dexkit.findMethod(
2945+
FindMethod.create().matcher(
2946+
MethodMatcher.create()
2947+
.addUsingString("is_biz_alerts_eligible")
2948+
.paramCount(1)
2949+
.paramTypes(Menu.class)
2950+
)
2951+
).first().getMethodInstance(classLoader);
2952+
});
2953+
}
29412954
}

app/src/main/java/com/wmods/wppenhacer/xposed/features/general/Others.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public void doHook() throws Exception {
8282
var animationEmojis = prefs.getBoolean("animation_emojis", false);
8383
var disableProfileStatus = prefs.getBoolean("disable_profile_status", false);
8484
var disableExpiration = prefs.getBoolean("disable_expiration", false);
85+
var isAction = prefs.getBoolean("buttonaction", true);
8586

8687
propsInteger.put(3877, oldStatus ? igstatus ? 2 : 0 : 2);
8788

@@ -103,6 +104,20 @@ public void doHook() throws Exception {
103104
propsBoolean.put(14862, newSettings);
104105
propsInteger.put(18564, newSettings ? 2 : 0);
105106

107+
if (newSettings) {
108+
if (!isAction) {
109+
Method hideMeIcon = Unobfuscator.loadHideMeTabIcon(classLoader);
110+
XposedBridge.hookMethod(hideMeIcon, XC_MethodReplacement.returnConstant(null));
111+
propsBoolean.put(25516, false);
112+
propsBoolean.put(23920, false);
113+
propsBoolean.put(14862, true);
114+
propsInteger.put(18564, 2);
115+
}
116+
}else {
117+
propsBoolean.put(14862, newSettings); // WHATS_HAPPENING_SENDING_ENABLED_CODE
118+
propsInteger.put(18564, newSettings ? 2 : 0); // ME_TAB_V2_VARIANTS_CODE
119+
}
120+
106121
propsBoolean.put(2889, floatingMenu);
107122

108123
// new text composer

0 commit comments

Comments
 (0)