Skip to content

Commit e08f828

Browse files
committed
Fix HideReceipt and HideSeen features
Signed-off-by: Dev4Mod <[email protected]>
1 parent 0f821cd commit e08f828

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/HideReceipt.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import com.wmods.wppenhacer.xposed.features.customization.HideSeenView;
1111
import com.wmods.wppenhacer.xposed.utils.ReflectionUtils;
1212

13+
import java.lang.reflect.Method;
14+
1315
import de.robv.android.xposed.XC_MethodHook;
1416
import de.robv.android.xposed.XSharedPreferences;
1517
import de.robv.android.xposed.XposedBridge;
@@ -45,7 +47,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
4547
var privacy = CustomPrivacy.getJSON(number);
4648
var customHideReceipt = privacy.optBoolean("HideReceipt", hideReceipt);
4749
var customHideRead = privacy.optBoolean("HideSeen", hideread);
48-
var msgTypeIdx = ReflectionUtils.findIndexOfType(param.args, String.class);
50+
var msgTypeIdx = ReflectionUtils.findIndexOfType(((Method) param.method).getParameterTypes(), String.class);
4951
if (param.args[msgTypeIdx] != "sender" && (customHideReceipt || ghostmode)) {
5052
if (!ReflectionUtils.isCalledFromMethod(method2) && ReflectionUtils.isCalledFromMethod(mInChat) && !customHideRead) {
5153
return;

app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/HideSeen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
106106
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
107107
if (ReflectionUtils.isCalledFromMethod(outsideMethod) || !ReflectionUtils.isCalledFromMethod(hideViewInChatMethod))
108108
return;
109-
var msgTypeIdx = ReflectionUtils.findIndexOfType(param.args, String.class);
109+
var msgTypeIdx = ReflectionUtils.findIndexOfType(((Method) param.method).getParameterTypes(), String.class);
110110
if (!Objects.equals("read", param.args[msgTypeIdx])) return;
111111
var jid = WppCore.getCurrentRawJID();
112112
var number = WppCore.stripJID(jid);

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<string name="novaconfig">New Settings Style</string>
4141
<string name="novaconfig_sum">Enable the new settings style, with profile photo on home screen toolbar</string>
4242
<string name="novofiltro">Search Functions</string>
43-
<string name="novofiltro_sum">Choose between Search Icon, Search Bar, or No Search (Enable Function for Disable Meta AI)</string>
43+
<string name="novofiltro_sum">Choose between Search Icon, Search Bar, or No Search</string>
4444
<string name="menuwicon">Menu Icons</string>
4545
<string name="menuwicon_sum">Add icons next to menu options across the app</string>
4646
<string name="freezelastseen">Freeze Last Seen</string>

0 commit comments

Comments
 (0)