File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
java/com/wmods/wppenhacer/xposed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -890,11 +890,22 @@ public synchronized static Method loadOnChangeStatus(ClassLoader loader) throws
890
890
});
891
891
}
892
892
893
+ public synchronized static Class <?> loadViewHolder (ClassLoader loader ) throws Exception {
894
+ Class <?> classViewHolder = XposedHelpers .findClassIfExists ("com.whatsapp.conversationslist.ViewHolder" , loader );
895
+
896
+ // for 20.xx, the current implementation returns null
897
+ if (classViewHolder == null ) {
898
+ Method method = findFirstMethodUsingStrings (loader , StringMatchType .Contains , "conversations/click/jid " );
899
+ classViewHolder = method .getParameterTypes ()[0 ];
900
+ }
901
+
902
+ return classViewHolder ;
903
+ }
904
+
893
905
public synchronized static Field loadViewHolderField1 (ClassLoader loader ) throws Exception {
894
906
return UnobfuscatorCache .getInstance ().getField (loader , () -> {
895
907
Class <?> class1 = loadOnChangeStatus (loader ).getDeclaringClass ().getSuperclass ();
896
- Class <?> classViewHolder = XposedHelpers .findClass ("com.whatsapp.conversationslist.ViewHolder" , loader );
897
- return ReflectionUtils .getFieldByType (class1 , classViewHolder );
908
+ return ReflectionUtils .getFieldByType (class1 , loadViewHolder (loader ));
898
909
});
899
910
}
900
911
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public void doHook() throws Throwable {
46
46
var showOnlineIcon = prefs .getBoolean ("dotonline" , false );
47
47
if (!showOnlineText && !showOnlineIcon ) return ;
48
48
49
- var classViewHolder = XposedHelpers . findClass ( "com.whatsapp.conversationslist.ViewHolder" , classLoader );
49
+ var classViewHolder = Unobfuscator . loadViewHolder ( classLoader );
50
50
XposedBridge .hookAllConstructors (classViewHolder , new XC_MethodHook () {
51
51
@ SuppressLint ("ResourceType" )
52
52
@ Override
Original file line number Diff line number Diff line change 119
119
<item >2.24.17.xx</item >
120
120
<item >2.24.18.xx</item >
121
121
<item >2.24.19.xx</item >
122
+ <item >2.24.20.xx</item >
122
123
</string-array >
123
124
<string-array name =" supported_versions_business" >
124
125
<item >2.24.16.xx</item >
You can’t perform that action at this time.
0 commit comments