File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
app/src/main/java/com/wmods/wppenhacer/xposed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1654,9 +1654,16 @@ public synchronized static Class loadListChannelItemClass(ClassLoader classLoade
16541654
16551655 public synchronized static Method [] loadTextStatusData (ClassLoader classLoader ) throws Exception {
16561656 return UnobfuscatorCache .getInstance ().getMethods (classLoader , () -> {
1657+ Class <?> textData ;
1658+ var textDataList = dexkit .findClass (FindClass .create ().matcher (ClassMatcher .create ().addUsingString ("TextData;" )));
1659+ if (textDataList .isEmpty ()) {
1660+ textData = findFirstClassUsingName (classLoader , StringMatchType .EndsWith , "TextData" );
1661+ } else {
1662+ textData = textDataList .get (0 ).getInstance (classLoader );
1663+ }
16571664 var methods = dexkit .findMethod (
16581665 FindMethod .create ().matcher (
1659- MethodMatcher .create ().addParamType ("com.whatsapp.TextData" )
1666+ MethodMatcher .create ().addParamType (textData )
16601667 )
16611668 );
16621669 if (methods .isEmpty ())
Original file line number Diff line number Diff line change @@ -77,12 +77,11 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
7777 var methodsTextStatus = Unobfuscator .loadTextStatusData (classLoader );
7878
7979 for (var method : methodsTextStatus ) {
80- Class <?> textDataClass = classLoader .loadClass ("com.whatsapp.TextData" );
8180 logDebug ("setColorTextComposer" , Unobfuscator .getMethodDescriptor (method ));
8281 XposedBridge .hookMethod (method , new XC_MethodHook () {
8382 @ Override
8483 protected void beforeHookedMethod (MethodHookParam param ) throws Throwable {
85- var textData = ReflectionUtils . getArg ( param .args , textDataClass , 0 ) ;
84+ var textData = param .args [ 0 ] ;
8685 if (textData == null ) return ;
8786 if (colorData .textColor != -1 )
8887 XposedHelpers .setObjectField (textData , "textColor" , colorData .textColor );
You can’t perform that action at this time.
0 commit comments