Skip to content

Commit 484fcd0

Browse files
committed
Update dependencies and refactor search bar hook
The following dependencies have been updated: - Bouncy Castle (bcpkix) to 1.82 - Lombok to 1.18.42 - OkHttp to 5.1.0 - DexKit to 2.0.7 Additionally, the method for locating the search bar view has been updated in the Unobfuscator for better compatibility. A check has been added to the hook to ensure it only acts on the correct search bar view. Signed-off-by: Dev4Mod <[email protected]>
1 parent 088e8b6 commit 484fcd0

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2035,7 +2035,7 @@ public static Field loadWaContactFromContactInfo(ClassLoader classLoader) throws
20352035
}
20362036

20372037
public static Method loadViewAddSearchBarMethod(ClassLoader classLoader) throws Exception {
2038-
return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> findFirstMethodUsingStrings(classLoader, StringMatchType.Contains, "ConversationsList/Search/addHeaderView"));
2038+
return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> findFirstMethodUsingStrings(classLoader, StringMatchType.Contains, "HeaderFooterRecyclerViewAdapter/addHeaderViewItemIfNeeded/duplicate-item"));
20392039
}
20402040

20412041
public static Method loadAddOptionSearchBarMethod(ClassLoader classLoader) throws Exception {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import org.json.JSONObject;
2828
import org.luckypray.dexkit.query.enums.StringMatchType;
29+
import org.luckypray.dexkit.util.DexSignUtil;
2930

3031
import java.lang.reflect.Field;
3132
import java.lang.reflect.Method;
@@ -604,9 +605,13 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
604605

605606
private void hookSearchbar(String filterChats) throws Exception {
606607
Method searchbar = Unobfuscator.loadViewAddSearchBarMethod(classLoader);
608+
log("ADD HEADER VIEW: " + DexSignUtil.getMethodDescriptor(searchbar));
607609
XposedBridge.hookMethod(searchbar, new XC_MethodHook() {
608610
@Override
609611
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
612+
var view = (View) param.args[0];
613+
if (view.getId() != Utils.getID("my_search_bar", "id"))
614+
return;
610615
if (!Objects.equals(filterChats, "2")) {
611616
param.setResult(null);
612617
}

gradle/libs.versions.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[versions]
22
arscblamer = "1.0"
3-
bcpkix-jdk18on = "1.80"
3+
bcpkix-jdk18on = "1.82"
44
betterypermissionhelper = "1.0.3"
55
filepicker = "9.2.5"
66
jstyleparser = "4.0.1"
7-
lombok = "1.18.38"
8-
okhttp = "4.12.0"
7+
lombok = "1.18.42"
8+
okhttp = "5.1.0"
99
xposed-legacy = "82"
1010
agp = "8.8.2"
1111
colorpicker = "1.1.0"
12-
dexkit = "2.0.4"
12+
dexkit = "2.0.7"
1313
nav = "2.9.0"
1414
kotlin = "2.1.10"
1515

0 commit comments

Comments
 (0)