Skip to content

Commit d3cc668

Browse files
committed
Fix disable home contacts filters
1 parent 40f9f7c commit d3cc668

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,4 +2063,12 @@ public synchronized static Method loadAdVerifyMethod(ClassLoader classLoader) th
20632063
return method;
20642064
});
20652065
}
2066+
2067+
public synchronized static Method loadHomeFiltersMethod(ClassLoader classLoader) throws Exception {
2068+
return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> {
2069+
var method = findFirstMethodUsingStrings(classLoader, StringMatchType.Contains, "ConversationsFragment/updateHeadersVisibility");
2070+
if (method == null) throw new RuntimeException("HomeFilters method not found");
2071+
return method;
2072+
});
2073+
}
20662074
}

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ public void doHook() throws Exception {
8585
var disableAd = prefs.getBoolean("disable_ads", false);
8686

8787
propsInteger.put(3877, oldStatus ? igstatus ? 2 : 0 : 2);
88+
8889
propsBoolean.put(5171, filterSeen);
90+
91+
propsBoolean.put(18250, false);
92+
propsBoolean.put(11528, false);
93+
8994
propsBoolean.put(4497, menuWIcons);
9095
propsBoolean.put(4023, false);
9196
propsBoolean.put(14862, newSettings);
@@ -246,6 +251,15 @@ public void doHook() throws Exception {
246251
disableAds();
247252
}
248253

254+
if (!filterSeen) {
255+
disableHomeFilters();
256+
}
257+
258+
}
259+
260+
private void disableHomeFilters() throws Exception {
261+
Method homeFilters = Unobfuscator.loadHomeFiltersMethod(classLoader);
262+
XposedBridge.hookMethod(homeFilters, XC_MethodReplacement.DO_NOTHING);
249263
}
250264

251265
private void disableAds() throws Exception {

0 commit comments

Comments
 (0)