From b6c9ee70e57924cd7b18524ef8c4dc442581d3bc Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Sun, 5 Jan 2025 20:20:45 -0300 Subject: [PATCH 01/12] fix bug in disable check update Signed-off-by: Dev4Mod --- .../ui/fragments/base/BasePreferenceFragment.java | 3 --- app/src/main/res/values/strings.xml | 7 +------ 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/src/main/java/com/wmods/wppenhacer/ui/fragments/base/BasePreferenceFragment.java b/app/src/main/java/com/wmods/wppenhacer/ui/fragments/base/BasePreferenceFragment.java index ecfe6ac7..cb9e913c 100644 --- a/app/src/main/java/com/wmods/wppenhacer/ui/fragments/base/BasePreferenceFragment.java +++ b/app/src/main/java/com/wmods/wppenhacer/ui/fragments/base/BasePreferenceFragment.java @@ -103,9 +103,6 @@ private boolean checkStoragePermission(Object newValue) { @SuppressLint("ApplySharedPref") private void chanceStates(String key) { - - var update_check = mPrefs.getBoolean("update_check", true); - setPreferenceState("update_check", update_check); var lite_mode = mPrefs.getBoolean("lite_mode", false); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index dcd73a85..3c2673da 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -408,12 +408,7 @@ Lite Mode Lite Mode disables most theme features and the connection bridge that keeps WhatsApp always active is turned off. Automatically Check for Update - - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. Change Default DPI Change the DPI setting for the application. Use 0 to reset to default. No contact with custom privacy! From 74fdb7ddf400b15cb9e9f7753757b2b624dfc761 Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Mon, 6 Jan 2025 14:55:48 -0300 Subject: [PATCH 02/12] Fix colors in chats ballons Signed-off-by: Dev4Mod --- .../xposed/core/devkit/Unobfuscator.java | 19 +++++++++-- .../features/customization/BubbleColors.java | 33 +++++++++++++------ 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java b/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java index 4b829d4c..a7a87785 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java @@ -3,6 +3,7 @@ import android.content.ContentValues; import android.content.Context; import android.content.SharedPreferences; +import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.net.Uri; import android.util.Log; @@ -1656,11 +1657,23 @@ public synchronized static Method loadBubbleDrawableMethod(ClassLoader classLoad }); } - public synchronized static Method loadDateWrapper(ClassLoader classLoader) throws Exception { + public synchronized static Method loadBallonDateDrawable(ClassLoader classLoader) throws Exception { return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> { - var methodData = dexkit.findMethod(FindMethod.create().matcher(MethodMatcher.create().name("getDateWrapperBackground"))); + var methodData = dexkit.findMethod(FindMethod.create().matcher(MethodMatcher.create().addUsingString("Unreachable code: direction=").returnType(Rect.class))); if (methodData.isEmpty()) throw new Exception("LoadDateWrapper method not found"); - return methodData.get(0).getMethodInstance(classLoader); + var clazz = methodData.get(0).getMethodInstance(classLoader).getDeclaringClass(); + var method = ReflectionUtils.findMethodUsingFilterIfExists(clazz, m -> List.of(1, 2).contains(m.getParameterCount()) && m.getParameterTypes()[0].equals(int.class) && m.getReturnType().equals(Drawable.class)); + if (method == null) throw new RuntimeException("DateWrapper method not found"); + return method; + }); + } + + public synchronized static Method loadBallonBorderDrawable(ClassLoader classLoader) throws Exception { + return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> { + var clazz = loadBallonDateDrawable(classLoader).getDeclaringClass(); + var method = ReflectionUtils.findMethodUsingFilterIfExists(clazz, m -> m.getParameterCount() == 3 && m.getReturnType().equals(Drawable.class)); + if (method == null) throw new RuntimeException("Ballon Border method not found"); + return method; }); } diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/BubbleColors.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/BubbleColors.java index 554bfeb1..ab666acc 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/BubbleColors.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/BubbleColors.java @@ -9,7 +9,6 @@ import androidx.annotation.NonNull; import com.wmods.wppenhacer.xposed.core.Feature; -import com.wmods.wppenhacer.xposed.core.components.FMessageWpp; import com.wmods.wppenhacer.xposed.core.devkit.Unobfuscator; import com.wmods.wppenhacer.xposed.utils.DesignUtils; import com.wmods.wppenhacer.xposed.utils.Utils; @@ -21,7 +20,6 @@ import de.robv.android.xposed.XC_MethodHook; import de.robv.android.xposed.XSharedPreferences; import de.robv.android.xposed.XposedBridge; -import de.robv.android.xposed.XposedHelpers; public class BubbleColors extends Feature { public BubbleColors(ClassLoader loader, XSharedPreferences preferences) { @@ -90,25 +88,40 @@ public void doHook() throws Exception { } } - var dateWrapper = Unobfuscator.loadDateWrapper(classLoader); + var dateWrapper = Unobfuscator.loadBallonDateDrawable(classLoader); + XposedBridge.hookMethod(dateWrapper, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { - var fmessageObject = XposedHelpers.callMethod(param.thisObject, "getFMessage"); - if (fmessageObject == null) return; - var view = (Drawable) param.getResult(); - var fmessage = new FMessageWpp(fmessageObject); - if (fmessage.getKey().isFromMe) { + var drawable = (Drawable) param.getResult(); + var position = (int) param.args[0]; + if (position == 3) { if (bubbleRightColor == 0) return; - view.setColorFilter(new PorterDuffColorFilter(bubbleRightColor, PorterDuff.Mode.SRC_IN)); + drawable.setColorFilter(new PorterDuffColorFilter(bubbleRightColor, PorterDuff.Mode.SRC_IN)); } else { if (bubbleLeftColor == 0) return; - view.setColorFilter(new PorterDuffColorFilter(bubbleLeftColor, PorterDuff.Mode.SRC_IN)); + drawable.setColorFilter(new PorterDuffColorFilter(bubbleLeftColor, PorterDuff.Mode.SRC_IN)); } + } + }); + var babblon = Unobfuscator.loadBallonBorderDrawable(classLoader); + XposedBridge.hookMethod(babblon, new XC_MethodHook() { + @Override + protected void afterHookedMethod(MethodHookParam param) throws Throwable { + var drawable = (Drawable) param.getResult(); + var position = (int) param.args[1]; + if (position == 3) { + if (bubbleRightColor == 0) return; + drawable.setColorFilter(new PorterDuffColorFilter(bubbleRightColor, PorterDuff.Mode.SRC_IN)); + } else { + if (bubbleLeftColor == 0) return; + drawable.setColorFilter(new PorterDuffColorFilter(bubbleLeftColor, PorterDuff.Mode.SRC_IN)); + } } }); + var bubbleDrawableMethod = Unobfuscator.loadBubbleDrawableMethod(classLoader); XposedBridge.hookMethod(bubbleDrawableMethod, new XC_MethodHook() { From 3c282ff2224e47e5410e2da7450f22a4a3adc138 Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Wed, 8 Jan 2025 19:06:11 -0300 Subject: [PATCH 03/12] Fix toolbar bio e name in WhatsApp Business Signed-off-by: Dev4Mod --- .../features/customization/CustomToolbar.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java index 940073f9..c1010bd1 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java @@ -7,6 +7,7 @@ import android.text.TextUtils; import android.view.Gravity; import android.view.View; +import android.view.ViewStub; import android.widget.LinearLayout; import android.widget.TextView; @@ -135,6 +136,7 @@ public void onMultiClick(View v) { if (!(logo.getParent() instanceof LinearLayout parent)) { var methods = Arrays.stream(actionbar.getClass().getDeclaredMethods()).filter(m -> m.getParameterCount() == 1 && m.getParameterTypes()[0] == CharSequence.class).toArray(Method[]::new); + if (showName) { methods[1].invoke(actionbar, name); } @@ -142,20 +144,32 @@ public void onMultiClick(View v) { if (showBio) { methods[0].invoke(actionbar, bio); } + XposedBridge.hookMethod(methods[1], new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { - if (showName) { + var name = WppCore.getMyName(); + var bio = WppCore.getMyBio(); + if (showBio && (param.args[0] == "" || param.args[0] == "WhatsApp")) { + ReflectionUtils.callMethod(methods[0], param.thisObject, bio); + } else { + ReflectionUtils.callMethod(methods[0], param.thisObject, ""); + } + if (showName && (param.args[0] == "" || param.args[0] == "WhatsApp")) { param.args[0] = name; } + if (logo instanceof ViewStub stub) { + stub.setLayoutParams(new LinearLayout.LayoutParams(1, 1)); + } } }); + return; } var mTitle = new TextView(homeActivity); mTitle.setText(showName ? name : "WhatsApp"); mTitle.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT, 1f)); - mTitle.setTextSize(20f); + mTitle.setTextSize(18f); mTitle.setTextColor(DesignUtils.getPrimaryTextColor()); parent.addView(mTitle); if (showBio) { From 7a60eec77955cd280a5791ac2da0bc5e629f4833 Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Sun, 12 Jan 2025 11:49:08 -0300 Subject: [PATCH 04/12] Add Broadcast to Separate Groups Signed-off-by: Dev4Mod --- .../xposed/features/customization/SeparateGroup.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/SeparateGroup.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/SeparateGroup.java index 4dde35a5..61b1992a 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/SeparateGroup.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/SeparateGroup.java @@ -351,13 +351,14 @@ public boolean addAll(@NonNull Collection c) { } private boolean checkGroup(Object chat) { - var requiredServer = isGroup ? "g.us" : "s.whatsapp.net"; var jid = getObjectField(chat, "A00"); if (jid == null) jid = getObjectField(chat, "A01"); if (jid == null) return true; if (XposedHelpers.findMethodExactIfExists(jid.getClass(), "getServer") != null) { var server = (String) callMethod(jid, "getServer"); - return server.equals(requiredServer); + if (isGroup) + return server.equals("broadcast") || server.equals("g.us"); + return server.equals("s.whatsapp.net"); } return true; } From ff026a7c552705fdbc3e91cef605524d4c7ff583 Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Mon, 13 Jan 2025 09:44:50 -0300 Subject: [PATCH 05/12] Add Broadcast icon from messages Signed-off-by: Dev4Mod --- .../wppenhacer/xposed/core/FeatureLoader.java | 4 +- .../xposed/core/components/FMessageWpp.java | 33 ++++++- .../xposed/core/devkit/Unobfuscator.java | 33 +++++++ .../features/privacy/HideTagForward.java | 46 --------- .../xposed/features/privacy/TagMessage.java | 93 +++++++++++++++++++ app/src/main/res/values/strings.xml | 2 + .../xml/preference_general_conversation.xml | 5 + 7 files changed, 164 insertions(+), 52 deletions(-) delete mode 100644 app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/HideTagForward.java create mode 100644 app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/TagMessage.java diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/core/FeatureLoader.java b/app/src/main/java/com/wmods/wppenhacer/xposed/core/FeatureLoader.java index 05112dac..b367f634 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/core/FeatureLoader.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/core/FeatureLoader.java @@ -72,7 +72,7 @@ import com.wmods.wppenhacer.xposed.features.privacy.HideChat; import com.wmods.wppenhacer.xposed.features.privacy.HideReceipt; import com.wmods.wppenhacer.xposed.features.privacy.HideSeen; -import com.wmods.wppenhacer.xposed.features.privacy.HideTagForward; +import com.wmods.wppenhacer.xposed.features.privacy.TagMessage; import com.wmods.wppenhacer.xposed.features.privacy.TypingPrivacy; import com.wmods.wppenhacer.xposed.features.privacy.ViewOnce; import com.wmods.wppenhacer.xposed.utils.DesignUtils; @@ -282,7 +282,7 @@ private static void plugins(@NonNull ClassLoader loader, @NonNull XSharedPrefere HideChat.class, HideReceipt.class, HideSeen.class, - HideTagForward.class, + TagMessage.class, HideTabs.class, IGStatus.class, LiteMode.class, diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/core/components/FMessageWpp.java b/app/src/main/java/com/wmods/wppenhacer/xposed/core/components/FMessageWpp.java index b058e25c..0e070d9c 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/core/components/FMessageWpp.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/core/components/FMessageWpp.java @@ -23,6 +23,7 @@ public class FMessageWpp { private static Field mediaTypeField; private static Method getOriginalMessageKey; private static Class abstractMediaMessageClass; + private static Field broadcastField; private final Object fmessage; public FMessageWpp(Object fMessage) { @@ -51,6 +52,7 @@ public static void init(ClassLoader classLoader) throws Exception { mediaTypeField = Unobfuscator.loadMediaTypeField(classLoader); getOriginalMessageKey = Unobfuscator.loadOriginalMessageKey(classLoader); abstractMediaMessageClass = Unobfuscator.loadAbstractMediaMessageClass(classLoader); + broadcastField = Unobfuscator.loadBroadcastTagField(classLoader); } public Object getUserJid() { @@ -99,6 +101,15 @@ public Key getOriginalKey() { return null; } + public boolean isBroadcast() { + try { + return (boolean) broadcastField.get(fmessage); + } catch (Exception e) { + XposedBridge.log(e); + } + return false; + } + public Object getObject() { return fmessage; } @@ -152,10 +163,10 @@ public int getMediaType() { public static class Key { public static Class TYPE; - public final Object thisObject; - public final String messageID; - public final boolean isFromMe; - public final Object remoteJid; + public Object thisObject; + public String messageID; + public boolean isFromMe; + public Object remoteJid; public Key(Object key) { this.thisObject = key; @@ -164,6 +175,20 @@ public Key(Object key) { this.remoteJid = XposedHelpers.getObjectField(key, "A00"); } + public void setIsFromMe(boolean value) { + XposedHelpers.setBooleanField(thisObject, "A02", value); + this.isFromMe = value; + } + + public void setRemoteJid(Object value) { + XposedHelpers.setObjectField(thisObject, "A00", value); + this.remoteJid = value; + } + + public void setMessageID(String messageID) { + XposedHelpers.setObjectField(thisObject, "A01", messageID); + this.messageID = messageID; + } } } diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java b/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java index a7a87785..1e7d9203 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java @@ -224,6 +224,39 @@ public synchronized static Method loadForwardTagMethod(ClassLoader classLoader) }); } + public synchronized static Field loadBroadcastTagField(ClassLoader classLoader) throws Exception { + return UnobfuscatorCache.getInstance().getField(classLoader, () -> { + var fmessage = loadFMessageClass(classLoader); + var clazzData = dexkit.findClass(FindClass.create().matcher(ClassMatcher.create().addUsingString("UPDATE_MESSAGE_MAIN_BROADCAST_SCAN_SQL"))); + if (clazzData.isEmpty()) return new Exception("BroadcastTag class not found"); + var methodData = dexkit.findMethod(FindMethod.create().searchInClass(clazzData).matcher(MethodMatcher.create().usingStrings("participant_hash", "view_mode", "broadcast"))); + if (methodData.isEmpty()) throw new Exception("BroadcastTag method support not found"); + var usingFields = methodData.get(0).getUsingFields(); + for (var ufield : usingFields) { + var field = ufield.getField(); + if (field.getDeclaredClass().getName().equals(fmessage.getName()) && + field.getType().getName().equals(boolean.class.getName()) + ) { + return field.getFieldInstance(classLoader); + } + } + throw new Exception("BroadcastTag field not found"); + }); + } + + public synchronized static Method loadBroadcastTagMethod(ClassLoader classLoader) throws Exception { + return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> { + var field = loadBroadcastTagField(classLoader); + var clazzData = dexkit.findClass(FindClass.create().matcher(ClassMatcher.create().addUsingString("ConversationRow/setUpUserNameInGroupView"))); + if (clazzData.isEmpty()) + throw new Exception("BroadcastTag: ConversationRow Class not found"); + var method = dexkit.findMethod(FindMethod.create().searchInClass(clazzData).matcher(MethodMatcher.create().addUsingField(DexSignUtil.getFieldDescriptor(field)))); + if (method.isEmpty()) + throw new Exception("BroadcastTag: ConversationRow Method not found"); + return method.get(0).getMethodInstance(classLoader); + }); + } + public synchronized static Class loadForwardClassMethod(ClassLoader classLoader) throws Exception { return UnobfuscatorCache.getInstance().getClass(classLoader, () -> findFirstClassUsingStrings(classLoader, StringMatchType.Contains, "UserActions/userActionForwardMessage")); } diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/HideTagForward.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/HideTagForward.java deleted file mode 100644 index 05805602..00000000 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/HideTagForward.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.wmods.wppenhacer.xposed.features.privacy; - -import androidx.annotation.NonNull; - -import com.wmods.wppenhacer.xposed.core.Feature; -import com.wmods.wppenhacer.xposed.core.devkit.Unobfuscator; -import com.wmods.wppenhacer.xposed.utils.ReflectionUtils; - -import java.lang.reflect.Method; - -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XSharedPreferences; -import de.robv.android.xposed.XposedBridge; - -public class HideTagForward extends Feature { - public HideTagForward(ClassLoader loader, XSharedPreferences preferences) { - super(loader, preferences); - } - - @Override - public void doHook() throws Exception { - Method method = Unobfuscator.loadForwardTagMethod(classLoader); - logDebug(Unobfuscator.getMethodDescriptor(method)); - Class forwardClass = Unobfuscator.loadForwardClassMethod(classLoader); - logDebug("ForwardClass: " + forwardClass.getName()); - - XposedBridge.hookMethod(method, new XC_MethodHook() { - @Override - protected void beforeHookedMethod(MethodHookParam param) throws Throwable { - if (!prefs.getBoolean("hidetag", false)) return; - var arg = (long) param.args[0]; - if (arg == 1) { - if (ReflectionUtils.isCalledFromClass(forwardClass)) { - param.args[0] = 0; - } - } - } - }); - } - - @NonNull - @Override - public String getPluginName() { - return "Hide Tag Forward"; - } -} diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/TagMessage.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/TagMessage.java new file mode 100644 index 00000000..b2d6f1f8 --- /dev/null +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/TagMessage.java @@ -0,0 +1,93 @@ +package com.wmods.wppenhacer.xposed.features.privacy; + +import android.view.ViewGroup; +import android.widget.ImageView; + +import androidx.annotation.NonNull; + +import com.wmods.wppenhacer.xposed.core.Feature; +import com.wmods.wppenhacer.xposed.core.components.FMessageWpp; +import com.wmods.wppenhacer.xposed.core.devkit.Unobfuscator; +import com.wmods.wppenhacer.xposed.utils.ReflectionUtils; +import com.wmods.wppenhacer.xposed.utils.Utils; + +import java.lang.reflect.Method; + +import de.robv.android.xposed.XC_MethodHook; +import de.robv.android.xposed.XSharedPreferences; +import de.robv.android.xposed.XposedBridge; +import de.robv.android.xposed.XposedHelpers; + +public class TagMessage extends Feature { + public TagMessage(ClassLoader loader, XSharedPreferences preferences) { + super(loader, preferences); + } + + @Override + public void doHook() throws Exception { + + Method method = Unobfuscator.loadForwardTagMethod(classLoader); + logDebug(Unobfuscator.getMethodDescriptor(method)); + Class forwardClass = Unobfuscator.loadForwardClassMethod(classLoader); + logDebug("ForwardClass: " + forwardClass.getName()); + + XposedBridge.hookMethod(method, new XC_MethodHook() { + @Override + protected void beforeHookedMethod(MethodHookParam param) throws Throwable { + if (!prefs.getBoolean("hidetag", false)) return; + var arg = (long) param.args[0]; + logDebug("arg: " + arg); + if (arg == 1) { + if (ReflectionUtils.isCalledFromClass(forwardClass)) { + param.args[0] = 0; + } + } + } + }); + + if (prefs.getBoolean("broadcast_tag", false)) { + hookBroadcastView(); + } + } + + private void hookBroadcastView() throws Exception { + Method method1 = Unobfuscator.loadBroadcastTagMethod(classLoader); + + XposedBridge.hookMethod(method1, new XC_MethodHook() { + private FMessageWpp.Key keyObj; + + @Override + protected void beforeHookedMethod(MethodHookParam param) throws Throwable { + keyObj = null; + var fmessage = new FMessageWpp(param.args[0]); + var key = fmessage.getKey(); + if (!key.isFromMe && fmessage.isBroadcast()) { + var view = (ViewGroup) param.thisObject; + var res = view.findViewById((int) param.args[1]); + if (res == null) { + var dateWrapper = (ViewGroup) view.findViewById(Utils.getID("date_wrapper", "id")); + var broadcast = new ImageView(view.getContext()); + broadcast.setId((int) param.args[1]); + dateWrapper.addView(broadcast, 0); + } + key.setIsFromMe(true); + keyObj = key; + } + } + + protected void afterHookedMethod(MethodHookParam param) throws Throwable { + if (keyObj != null) { + var find = XposedHelpers.getObjectField(param.thisObject, "A2u"); + keyObj.setIsFromMe(false); + } + } + + }); + } + + @NonNull + @Override + public String getPluginName() { + return "Tag Message"; + } +} diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3c2673da..bec8c056 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -412,4 +412,6 @@ Change Default DPI Change the DPI setting for the application. Use 0 to reset to default. No contact with custom privacy! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/xml/preference_general_conversation.xml b/app/src/main/res/xml/preference_general_conversation.xml index 1e9662aa..3f1330f2 100644 --- a/app/src/main/res/xml/preference_general_conversation.xml +++ b/app/src/main/res/xml/preference_general_conversation.xml @@ -40,6 +40,11 @@ app:summary="@string/antidisappearing_sum" app:title="@string/antidisappearing" /> + + Date: Mon, 13 Jan 2025 10:44:27 -0300 Subject: [PATCH 06/12] Fix bug in Call Privacy Signed-off-by: Dev4Mod --- .../xposed/core/devkit/Unobfuscator.java | 2 +- .../xposed/features/privacy/CallPrivacy.java | 26 +++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java b/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java index 1e7d9203..78026ae4 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java @@ -813,7 +813,7 @@ public synchronized static Method[] loadArchiveHideViewMethod(ClassLoader loader public synchronized static Method loadAntiRevokeOnCallReceivedMethod(ClassLoader loader) throws Exception { return UnobfuscatorCache.getInstance().getMethod(loader, () -> { - var method = findFirstMethodUsingStrings(loader, StringMatchType.Contains, "VoiceService:callStateChangedOnUiThread"); + var method = findFirstMethodUsingStrings(loader, StringMatchType.Contains, "voip/callStateChangedOnUIThread"); if (method == null) throw new Exception("OnCallReceiver method not found"); return method; }); diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/CallPrivacy.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/CallPrivacy.java index 1880b0b0..5b930c08 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/CallPrivacy.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/privacy/CallPrivacy.java @@ -14,6 +14,7 @@ import com.wmods.wppenhacer.xposed.utils.Utils; import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays; import java.util.stream.Collectors; @@ -31,6 +32,10 @@ public class CallPrivacy extends Feature { @Override public void doHook() throws Throwable { + var clazzVoip = XposedHelpers.findClass("com.whatsapp.voipcalling.Voip", classLoader); + var endCallMethod = ReflectionUtils.findMethodUsingFilter(clazzVoip, m -> m.getName().equals("endCall")); + var rejectCallMethod = ReflectionUtils.findMethodUsingFilter(clazzVoip, m -> m.getName().equals("rejectCall")); + var onCallReceivedMethod = Unobfuscator.loadAntiRevokeOnCallReceivedMethod(classLoader); XposedBridge.hookMethod(onCallReceivedMethod, new XC_MethodHook() { @@ -54,23 +59,28 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { Tasker.sendTaskerEvent(WppCore.getContactName(userJid), WppCore.stripJID(WppCore.getRawString(userJid)), "call_received"); var blockCall = checkCallBlock(userJid, PrivacyType.getByValue(type)); if (!blockCall) return; - var clazzVoip = XposedHelpers.findClass("com.whatsapp.voipcalling.Voip", classLoader); var rejectType = prefs.getString("call_type", "no_internet"); + + // Need Instance of VoipManager from WhatsApp 2.24.24.XX + Object voipManager = null; + if (!Modifier.isStatic(endCallMethod.getModifiers())) { + var fieldVoipManager = ReflectionUtils.findFieldUsingFilterIfExists(param.thisObject.getClass(), field -> clazzVoip.isInstance(ReflectionUtils.getObjectField(field, param.thisObject))); + voipManager = fieldVoipManager == null ? null : fieldVoipManager.get(param.thisObject); + } switch (rejectType) { case "uncallable": case "declined": - var rejectCallMethod = ReflectionUtils.findMethodUsingFilter(clazzVoip, m -> m.getName().equals("rejectCall")); var params = ReflectionUtils.initArray(rejectCallMethod.getParameterTypes()); params[0] = callId; params[1] = "declined".equals(rejectType) ? null : rejectType; - ReflectionUtils.callMethod(rejectCallMethod, null, params); + ReflectionUtils.callMethod(rejectCallMethod, voipManager, params); + param.setResult(true); break; case "ended": - try { - XposedHelpers.callStaticMethod(clazzVoip, "endCall", true); - } catch (NoSuchMethodError e) { - XposedHelpers.callStaticMethod(clazzVoip, "endCall", true, 0); - } + var params1 = ReflectionUtils.initArray(endCallMethod.getParameterTypes()); + params1[0] = true; + ReflectionUtils.callMethod(endCallMethod, voipManager, params1); + param.setResult(true); break; default: } From d11fe64efaec36b5f68029da44bf6db0c9c9e2e9 Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Mon, 13 Jan 2025 12:40:23 -0300 Subject: [PATCH 07/12] update supported versions Signed-off-by: Dev4Mod --- app/src/main/res/values/arrays.xml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index b9740899..999f585e 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -114,22 +114,18 @@ 2 - 2.24.20.xx - 2.24.21.xx - 2.24.22.xx 2.24.23.xx 2.24.24.xx 2.24.25.xx 2.24.26.xx + 2.25.1.xx - 2.24.20.xx - 2.24.21.xx - 2.24.22.xx 2.24.23.xx 2.24.24.xx 2.24.25.xx 2.24.26.xx + 2.25.1.xx image/* @@ -180,4 +176,5 @@ 1 2 + From 2a7bae0103b08f770221613c79b9791f3bd95391 Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Mon, 13 Jan 2025 15:34:45 -0300 Subject: [PATCH 08/12] Fix toolbar bio and name in Wa Business Signed-off-by: Dev4Mod --- .../features/customization/CustomToolbar.java | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java index c1010bd1..0bd7b2ff 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java @@ -7,6 +7,7 @@ import android.text.TextUtils; import android.view.Gravity; import android.view.View; +import android.view.ViewGroup; import android.view.ViewStub; import android.widget.LinearLayout; import android.widget.TextView; @@ -105,7 +106,7 @@ public MethodHook(boolean showName, boolean showBio, String typeArchive) { protected void afterHookedMethod(MethodHookParam param) throws Throwable { var homeActivity = (Activity) param.thisObject; var actionbar = XposedHelpers.callMethod(homeActivity, "getSupportActionBar"); - var toolbar = homeActivity.findViewById(Utils.getID("toolbar", "id")); + var toolbar = (ViewGroup) homeActivity.findViewById(Utils.getID("toolbar", "id")); var logo = toolbar.findViewById(Utils.getID("toolbar_logo", "id")); var name = WppCore.getMyName(); var bio = WppCore.getMyBio(); @@ -132,11 +133,11 @@ public void onMultiClick(View v) { } if (!showBio && !showName) return; + var parent = (ViewGroup) logo.getParent(); - if (!(logo.getParent() instanceof LinearLayout parent)) { + if (!(parent instanceof LinearLayout) && logo.getVisibility() == View.VISIBLE) { var methods = Arrays.stream(actionbar.getClass().getDeclaredMethods()).filter(m -> m.getParameterCount() == 1 && m.getParameterTypes()[0] == CharSequence.class).toArray(Method[]::new); - if (showName) { methods[1].invoke(actionbar, name); } @@ -159,19 +160,42 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { param.args[0] = name; } if (logo instanceof ViewStub stub) { - stub.setLayoutParams(new LinearLayout.LayoutParams(1, 1)); + var layoutParams = stub.getLayoutParams(); + layoutParams.width = 1; + layoutParams.height = 200; + stub.setLayoutParams(layoutParams); } } }); return; } + LinearLayout layout; + if (parent instanceof LinearLayout) { + layout = (LinearLayout) parent; + } else { + layout = new LinearLayout(homeActivity); + layout.setOrientation(LinearLayout.VERTICAL); + toolbar.removeAllViews(); + parent.addView(layout, 0); + var clazzWDS = XposedHelpers.findClass("com.whatsapp.wds.components.topbar.WDSToolbar", homeActivity.getClassLoader()); + if (clazzWDS.isInstance(toolbar)) { + XposedHelpers.callMethod(toolbar, "setTitle", (CharSequence) null); + XposedHelpers.findAndHookMethod(clazzWDS, "setTitle", CharSequence.class, new XC_MethodHook() { + @Override + protected void beforeHookedMethod(MethodHookParam param) throws Throwable { + if (param.thisObject != toolbar) return; + param.setResult(null); + } + }); + } + } var mTitle = new TextView(homeActivity); mTitle.setText(showName ? name : "WhatsApp"); mTitle.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT, 1f)); mTitle.setTextSize(18f); mTitle.setTextColor(DesignUtils.getPrimaryTextColor()); - parent.addView(mTitle); + layout.addView(mTitle); if (showBio) { TextView mSubtitle = new TextView(homeActivity); mSubtitle.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT)); @@ -182,7 +206,7 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { mSubtitle.setEllipsize(TextUtils.TruncateAt.MARQUEE); mSubtitle.setSingleLine(); mSubtitle.setSelected(true); - parent.addView(mSubtitle); + layout.addView(mSubtitle); } else { mTitle.setGravity(Gravity.CENTER); } From 89f8026fed16fcfd07dee1bc5e2cc4011936e91e Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Mon, 13 Jan 2025 19:12:22 -0300 Subject: [PATCH 09/12] Add Check timestamp in deleted for all Signed-off-by: Dev4Mod --- .../xposed/core/devkit/Unobfuscator.java | 16 ++++++ .../xposed/features/general/ChatLimit.java | 49 ++++++++++++++++--- app/src/main/res/values/strings.xml | 4 +- 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java b/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java index 78026ae4..ffc2a113 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java @@ -1800,4 +1800,20 @@ public static Method loadMediaQualitySelectionMethod(ClassLoader classLoader) th return methodData.get(0).getMethodInstance(classLoader); }); } + + public static Field loadFmessageTimestampField(ClassLoader classLoader) throws Exception { + return UnobfuscatorCache.getInstance().getField(classLoader, () -> { + var fmessageClass = loadFMessageClass(classLoader); + var chatLimitDelete2Method = Unobfuscator.loadChatLimitDelete2Method(classLoader); + var usingFields = dexkit.getMethodData(chatLimitDelete2Method).getUsingFields(); + for (var uField : usingFields) { + var field = uField.getField(); + if (field.getDeclaredClass().getName().equals(fmessageClass.getName()) + && field.getType().getName().equals(long.class.getName())) { + return field.getFieldInstance(classLoader); + } + } + throw new RuntimeException("FMessage Timestamp method not found"); + }); + } } diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/ChatLimit.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/ChatLimit.java index 0215e665..8d5dd815 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/ChatLimit.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/general/ChatLimit.java @@ -10,6 +10,8 @@ import com.wmods.wppenhacer.xposed.core.devkit.Unobfuscator; import com.wmods.wppenhacer.xposed.utils.ReflectionUtils; +import java.util.Set; + import de.robv.android.xposed.XC_MethodHook; import de.robv.android.xposed.XSharedPreferences; import de.robv.android.xposed.XposedBridge; @@ -28,6 +30,8 @@ public void doHook() throws Throwable { var chatLimitDeleteMethod = Unobfuscator.loadChatLimitDeleteMethod(classLoader); var chatLimitDelete2Method = Unobfuscator.loadChatLimitDelete2Method(classLoader); + var fmessageTimestampMethod = Unobfuscator.loadFmessageTimestampField(classLoader); + var epUpdateMethod = Unobfuscator.loadEphemeralInsertdb(classLoader); XposedHelpers.findAndHookMethod("com.whatsapp.HomeActivity", classLoader, "onCreate", Bundle.class, new XC_MethodHook() { @@ -57,14 +61,45 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { // Others.propsInteger.put(3272, Integer.MAX_VALUE); // } - XposedBridge.hookMethod(chatLimitDeleteMethod, new XC_MethodHook() { - @Override - protected void afterHookedMethod(MethodHookParam param) throws Throwable { - if (ReflectionUtils.isCalledFromMethod(chatLimitDelete2Method) && revokeallmessages) { - param.setResult(0L); + + if (revokeallmessages) { + XposedBridge.hookMethod(chatLimitDelete2Method, new XC_MethodHook() { + private Unhook unhooked; + + @Override + protected void beforeHookedMethod(MethodHookParam param) throws Throwable { + var list = ReflectionUtils.findArrayOfType(param.args, Set.class); + if (list.isEmpty()) return; + var listMessages = (Set) list.get(0).second; + var isExpired = false; + for (var fmessageObj : listMessages) { + var timestamp = fmessageTimestampMethod.getLong(fmessageObj); + // verify message is expired (max: 3 days) + if (System.currentTimeMillis() - timestamp > 3 * 24 * 60 * 60 * 1000) { + isExpired = true; + break; + } + } + if (!isExpired) { + unhooked = XposedBridge.hookMethod(chatLimitDeleteMethod, new XC_MethodHook() { + @Override + protected void afterHookedMethod(MethodHookParam param) throws Throwable { + if (ReflectionUtils.isCalledFromMethod(chatLimitDelete2Method)) { + param.setResult(0L); + } + } + }); + } } - } - }); + + @Override + protected void afterHookedMethod(MethodHookParam param) throws Throwable { + if (unhooked != null) { + unhooked.unhook(); + } + } + }); + } var seeMoreMethod = Unobfuscator.loadSeeMoreConstructor(classLoader); XposedBridge.hookMethod(seeMoreMethod, new XC_MethodHook() { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bec8c056..aafbe2f8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -82,8 +82,8 @@ Dev4Mod (Contributor) Disable Pinned Chats Limit Disable limit of 3 pinned chats - \"Delete for everyone\" on all messages - Remove the 24-hour limit on deleting a message for everyone + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone Disabled Show Text Show Icon From b5f4f53ffb295870504d3a7fae26b441da8e5478 Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Mon, 13 Jan 2025 19:13:23 -0300 Subject: [PATCH 10/12] update translations Signed-off-by: Dev4Mod --- app/src/main/res/values-ar/strings.xml | 12 ++--- app/src/main/res/values-de/strings.xml | 12 ++--- app/src/main/res/values-es/strings.xml | 20 ++++---- app/src/main/res/values-fr/strings.xml | 12 ++--- app/src/main/res/values-id/strings.xml | 64 +++++++++++++------------- app/src/main/res/values-in/strings.xml | 20 ++++---- app/src/main/res/values-it/strings.xml | 20 ++++---- app/src/main/res/values-iw/strings.xml | 20 ++++---- app/src/main/res/values-pt/strings.xml | 20 ++++---- app/src/main/res/values-ru/strings.xml | 40 ++++++++-------- app/src/main/res/values-tr/strings.xml | 20 ++++---- app/src/main/res/values-zh/strings.xml | 12 ++--- 12 files changed, 124 insertions(+), 148 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 9d0b2daf..3a50bc40 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -81,8 +81,8 @@ (مساهم)Dev4Mod تعطيل حد الدردشة المثبتة تعطيل حد 3 دردشة مثبتة - \"حذف للجميع\" على جميع الرسائل - إزالة حد الـ 24 ساعة لحذف رسالة للجميع + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone معطل إظهار النص إظهار الأيقونة @@ -406,12 +406,10 @@ الوضع الخفيف يعطل الوضع الخفيف معظم ميزات الثيمات ويتم إيقاف تشغيل جسر الاتصال الذي يحافظ على WhatsApp نشطًا دائمًا. Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. تغيير DPI الافتراضي تغيير إعداد DPI للتطبيق. استخدم 0 لإعادة تعيين الافتراضي. No contact with custom privacy! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 5a305dfa..39cc9ce2 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -80,8 +80,8 @@ Dev4Mod (Entwickler) Begrenzung angepinnter Chats deaktivieren Das Limit von 3 angepinnten Unterhaltungen wird aufgehoben - Löschen von Nachrichten - Entfernt die 24-Stunden-Begrenzung zum Löschen einer Nachricht + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone Deaktiviert Text anzeigen Symbol anzeigen @@ -405,12 +405,10 @@ Lite Mode Lite Mode disables most theme features and the connection bridge that keeps WhatsApp always active is turned off. Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. Change Default DPI Change the DPI setting for the application. Use 0 to reset to default. No contact with custom privacy! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 20a2ae89..565d85eb 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -80,8 +80,8 @@ Dev4Mod (Contribuidor) Desactivar límite de Chats Anclados Desactivar límite de 3 chats fijados - Eliminar para todos, todos los mensajes - Elimina el límite de 24 horas para poder borrar el mensaje para todos. + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone Desactivado Mostrar Texto Mostrar Icono @@ -140,8 +140,8 @@ Enviar ¿Quieres enviar un Sticker? Enviar Sticker - Enable filter chats for type - Show options to filter chats for groups, contacts and unseen messages + Habilitar chats de filtro por tipo + Mostrar opciones para filtrar chats por grupos, contactos y mensajes no vistos Ocultar canales Ocultar canales de la pestaña Novedades Chat @@ -404,13 +404,11 @@ Permiso de la carpeta \'Download\' Modo Lite El Modo Lite desactiva la mayoría de las características de los temas y el puente de conexión que mantiene WhatsApp siempre activo, está desactivado. (Puede que ahorres más batería). - Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Buscar actualizaciones automáticamente + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. Cambiar DPI por defecto Cambia la configuración DPI de la aplicación. Utilice 0 para restablecer el valor predeterminado. - No contact with custom privacy! + ¡No hay contacto con privacidad personalizada! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 04aad987..04ec72b0 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -80,8 +80,8 @@ Dev4Mod (Contributeur) Disable Pinned Limit Disable pinned limit of 3 chats - Delete for everyone all messages - Remove the 24-hour limit to be able to delete the message for everyone. + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone Désactivé Afficher le texte Show Icône @@ -405,12 +405,10 @@ Lite Mode Lite Mode disables most theme features and the connection bridge that keeps WhatsApp always active is turned off. Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. Change Default DPI Change the DPI setting for the application. Use 0 to reset to default. No contact with custom privacy! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index bd43ce85..b1909ca5 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -84,8 +84,8 @@ Dev4Mod (Penyumbang) Nonaktifkan Batas Pesan yang Disematkan Nonaktifkan batas 3 pesan yang disematkan - \"Hapus untuk semua orang\" di semua pesan - Hapus batas 24 jam dalam menghapus pesan untuk semua orang + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone Nonaktif Tampilkan teks Tampilkan ikon @@ -157,8 +157,8 @@ Harap gunakan versi WhatsApp yang didukung! Atur warna #00000000 ke warna default Konfirmasi Sebelum Mengirim Stiker Tampilkan dialog sebelum mengirim stiker - Increase Video Size Limit (MB) - Increase Video size limit to 200MB + Tingkatkan batas ukuran Video (MB) + Tingkatkan batas ukuran Video ke 200MB Kirim Video Resolusi Asli Kirim video dalam resolusi asli untuk status, grup dan obrolan Kirim Video 60fps @@ -309,7 +309,7 @@ Saat Anda mengaktifkan bekukan \"terakhir dilihat dan online\", Anda tidak dapat Jika Anda mengalami masalah atau memiliki pertanyaan tentang Wa Enhancer, silakan kunjungi Telegram. License Proyek ini dilisensikan berdasarkan Lisensi GNU - lihat berkas LICENSE untuk detailnya.\n\nCatatan: Harap gunakan Wa Enhancer secara bertanggung jawab dan sesuai dengan syarat dan ketentuan aplikasi yang Anda modifikasi. Penyalahgunaan alat ini dapat mengakibatkan konsekuensi hukum. - Select a color + Pilih warna Penampilan Kustom Aktifkan filter berdasarkan ID dan CSS Kustom Click 5 times on the WhatsApp title @@ -326,31 +326,31 @@ Saat Anda mengaktifkan bekukan \"terakhir dilihat dan online\", Anda tidak dapat Invalid zip file Theme imported successfully New Theme Name - Create + Buat Storage Permission Allow Wa Enhancer to access your external storage? - Allow - Deny - Saved + Izinkan + Tolak + Disimpan Exported Enter image file name Name must end with .png "Imported as " - Save + Simpan Import Image Export as zip Clear - Exit - Create New Theme + Keluar + Buat Tema Baru Import Theme Theme Manager Manage themes using CSS for WhatsApp Please, grant permissions to read images and read external storage - One Row - Two row - (Expiration: %s) - %1$s deleted a message in group %2$s - List animations (Home Screen) + Satu Baris + Dua Baris + (Kedaluwarsa: %s) + %1$s menghapus pesan di grup %2$s + Daftar animasi (Layar Utama) Add animations when swiping the chat list Remove Stamp from Copied Messages Removes name and date when copying more than one message @@ -364,8 +364,8 @@ Saat Anda mengaktifkan bekukan \"terakhir dilihat dan online\", Anda tidak dapat Hides the sending of audio reading when listening to it Ghost mode Ghost Mode makes you invisible, hiding your blue tick (stories, messages and groups), second tick and your last seen from all contacts - Disable - Enable + Nonaktifkan + Aktifkan Ghost Mode [%s] Show Ghost Mode Button Show a Ghost Mode button on the home screen toolbar @@ -381,8 +381,8 @@ Saat Anda mengaktifkan bekukan \"terakhir dilihat dan online\", Anda tidak dapat Disable Battery Optimization Bootloader Spoofer Use this if you have been banned and are receiving the unofficial Whatsapp message - not available - Select All + tidak tersedia + Pilih Semua Custom colors for text status Press and hold on the color selector in the status to customize it Enable Wa Enhancer Button @@ -395,7 +395,7 @@ Saat Anda mengaktifkan bekukan \"terakhir dilihat dan online\", Anda tidak dapat Replaces the default Whatsapp transcription with AssemblyAI AssemblyAI key AssemblyAI API access key (Login to the website and create an account to get your key) - Enable Google Translate + Aktifkan Google Translate Replaces Whatsapp\'s native translator with Google Translate Show in contact info Show in contact info menu @@ -404,25 +404,23 @@ Saat Anda mengaktifkan bekukan \"terakhir dilihat dan online\", Anda tidak dapat Show you online even if you minimize WhatsApp (Doesn\'t work if you remove it from recents) Additional call information Receive a notification with additional information after the call ends - Contact: %s - Number: +%s - Country: %s - City: %s + Kontak: %s + Nomor: +%s + Negara: %s + Kota: %s IP: %s Platform: %s - WhatsApp Version: %s - Call Information + Versi WhatsApp: %s + Informasi Panggilan To use WAE Enhancer\'s download functions, you must select a folder to save the downloaded files. Download Folder Permission Lite Mode Lite Mode disables most theme features and the connection bridge that keeps WhatsApp always active is turned off. Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. Change Default DPI Change the DPI setting for the application. Use 0 to reset to default. No contact with custom privacy! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 2e57c986..e9e85339 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -83,8 +83,8 @@ Dev4Mod (Penyumbang) Nonaktifkan Batas Pesan yang Disematkan Nonaktifkan batas 3 pesan yang disematkan - \"Hapus untuk semua orang\" di semua pesan - Hapus batas 24 jam dalam menghapus pesan untuk semua orang + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone Nonaktif Tampilkan teks Tampilkan ikon @@ -146,8 +146,8 @@ Harap gunakan versi WhatsApp yang didukung! Kirim Apakah Anda ingin mengirim Stiker? Kirim Stiker - Enable filter chats for type - Show options to filter chats for groups, contacts and unseen messages + Aktifkan Filter Obrolan + Tampilkan opsi untuk memfilter obrolan seperti grup, kontak dan pesan belum dibaca Sembunyikan Saluran Sembunyikan saluran dari tab Pembaruan Obrolan @@ -413,13 +413,11 @@ Harap gunakan versi WhatsApp yang didukung! Izin Folder Unduhan Mode Ringan Mode Ringan menonaktifkan sebagian besar fitur tema dan jembatan koneksi yang membuat WhatsApp selalu aktif dimatikan. - Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Periksa Pembaruan Secara Otomatis + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. Ubah DPI Bawaan Ubah pengaturan DPI untuk aplikasi. Gunakan 0 untuk mengatur ulang ke bawaan. - No contact with custom privacy! + Tidak ada kontak dengan privasi khusus! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 2d789a2b..b3f92cc6 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -80,8 +80,8 @@ Dev4Mod (Collaboratore) Disabilita limite chat fissate Disabilita il limite di 3 chat fissate - \"Elimina per tutti\" su tutti i messaggi - Rimuovi il limite di 24 ore per poter eliminare il messaggio per tutti + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone Disabilitato Mostra testo Mostra icona @@ -140,8 +140,8 @@ Invia Vuoi inviare lo sticker? Invia sticker - Enable filter chats for type - Show options to filter chats for groups, contacts and unseen messages + Abilita filtro chat per tipo + Mostra opzioni per filtrare le chat per gruppi, contatti e messaggi non visti Nascondi Canali Nascondi i canali dalla scheda Aggiornamenti Chat @@ -404,13 +404,11 @@ Permesso Cartella Di Download Modalità Lite La Modalità Lite disabilita la maggior parte delle funzioni del tema e il ponte di connessione che mantiene WhatsApp sempre attivo è disattivato. - Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Controlla Aggiornamenti Automaticamente + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. Cambia DPI Predefiniti Cambia l\'impostazione DPI per l\'applicazione. Usa 0 per reimpostare il valore predefinito. - No contact with custom privacy! + Nessun contatto con privacy personalizzata! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index f7720c3e..1433b5ab 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -81,8 +81,8 @@ Dev4Mod (תורם) השבת את מגבלת הצ\'אטים המוצמדים אפשר לנעוץ צ\'אטים ללא הגבלה - אפשר תמיד \"מחק לכולם\" - מחק הודעה למשתמשים אחרים גם אחרי שעברו 24 שעות משליחת ההודעה + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone מושבת הצג טקסט הצג אייקון @@ -141,8 +141,8 @@ כן האם ברצונך לשלוח את המדבקה? שליחת הסטיקר - Enable filter chats for type - Show options to filter chats for groups, contacts and unseen messages + אפשר סינון צ\'אטים במסך הבית + הצג אפשרויות לסינון צ\'אטים עבור קבוצות, אנשי קשר והודעות שלא נראו הסתר ערוצים הסתר ערוצים מכרטיסיית העדכונים צ\'אטים @@ -406,13 +406,11 @@ הרשאת תיקייה מצב לייט מצב Lite משבית את רוב תכונות הנושא וגשר החיבור ששומר על WhatsApp תמיד פעיל כבוי. - Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + בדוק אוטומטית אם יש עדכונים + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. שנה את ברירת המחדל של DPI שנה את הגדרת DPI עבור היישום. השתמש ב-0 כדי לאפס לברירת המחדל. - No contact with custom privacy! + אין קשר עם פרטיות מותאמת אישית! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 8522fad0..0ab0fb79 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -80,8 +80,8 @@ Dev4Mod (Desenvolvedor) Desativar limite de conversas fixadas Desative o limite de 3 conversas fixadas - Ativar excluir para todos em todas as mensagens - Remova o limite de 24 horas para excluir uma mensagem para todos + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone Desativado Mostrar texto Exibir Ícone @@ -140,8 +140,8 @@ Enviar Você quer enviar figurinha? Enviar figurinha - Enable filter chats for type - Show options to filter chats for groups, contacts and unseen messages + Ativar filtro de conversas + Mostre opções para filtrar conversas de grupos, contatos e mensagens não vistas. Desativar canais Desative os canais na aba Atualizações Conversas @@ -404,13 +404,11 @@ Permissão de download de pasta Modo simples O Modo simples desativa a maioria dos recursos do tema e a ponte de conexão que mantém o WhatsApp sempre ativo fica desligada. - Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Verificar atualizações automaticamente + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. Alterar DPI padrão Altere a configuração de DPI do app. Use 0 para redefinir para o padrão. - No contact with custom privacy! + Nenhum contato com privacidade personalizada! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 8d693cf7..351851c0 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -80,8 +80,8 @@ Dev4mod (участник) Отключить лимит закрепленных чатов Отключить ограничение на 3 закрепленных чата - \"Удалить для всех\" во всех сообщений - Удалить 24-часовой лимит на удаление сообщения для всех + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone Отключено Показать текст Показать иконку @@ -140,8 +140,8 @@ Отправить Отправить этот стикер? Отправить стикер - Enable filter chats for type - Show options to filter chats for groups, contacts and unseen messages + Включить фильтрацию чатов по типу + Показать опции фильтрации чатов для групп, контактов и невидимых сообщений Скрыть каналы Скрыть каналы на вкладке \"Обновления\" Чат @@ -150,8 +150,8 @@ Установить цвет #00000000 по умолчанию Подтверждение перед отправкой Стикера Показать диалог перед отправкой Стикера - Increase Video Size Limit (MB) - Increase Video size limit to 200MB + Увеличить размер лимита видео (MB) + Увеличить лимит видео до 200 Мб Отправить видео в реальном разрешении Отправлять видео в реальном разрешении в статус, группу и чаты Отправить видео в 60fps @@ -182,8 +182,8 @@ Добавить кнопку на главном экране для перезапуска приложения Показывать всплывающее уведомление об удалении сообщения Показывать всплывающее уведомление, если какой-либо контакт удаляет какое-либо сообщение - Enable Top Navigation (Obsolete) - Activate the old navigation bar (does not work for versions above Wpp 2.24.24 and will be removed soon) + Включить верхнюю навигацию (устарело) + Активировать старую панель навигации (не работает в версиях выше Wpp 2.24.24 и скоро будет удалено) Скрыть синюю метку в группах Просмотр сообщений на экране групп без уведомления пользователей Показать кнопку \"Скрыть последнее посещение\" @@ -400,17 +400,15 @@ Платформа: %s Версия WhatsApp: %s Информация о звонке - To use WAE Enhancer\'s download functions, you must select a folder to save the downloaded files. - Download Folder Permission - Lite Mode - Lite Mode disables most theme features and the connection bridge that keeps WhatsApp always active is turned off. - Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - - Change Default DPI - Change the DPI setting for the application. Use 0 to reset to default. - No contact with custom privacy! + Для использования функций загрузки WAE Enhancer, необходимо выбрать папку для сохранения загруженных файлов. + Разрешение на доступ к папке + Режим Lite + Lite Mode отключает большинство функций темы и мост соединения, который держит WhatsApp всегда активным. + Автоматически проверять наличие обновлений + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. + Изменить DPI по умолчанию + Измените параметр DPI для приложения. Используйте 0, чтобы сбросить на значения по умолчанию. + Нет контакта с приватностью! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 273b1cc3..3038d502 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -80,8 +80,8 @@ Dev4Mod (Katkıda Bulunan) Sabitlenmiş Sohbet Sınırını Kaldır 3 sabitlenmiş sohbet sınırını kaldır - Tüm mesajlar için \"Herkes için sil\" - Bir mesajı herkes için silme üzerindeki 24 saatlik sınırı kaldır + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone Devre Dışı Metni Göster Simgeyi Göster @@ -140,8 +140,8 @@ Gönder Çıkartma göndermek istiyor musunuz? Çıkartma Gönder - Enable filter chats for type - Show options to filter chats for groups, contacts and unseen messages + Tür için sohbetleri filtrelemeyi etkinleştir + Gruplar, kişiler ve okunmamış mesajlar için sohbet filtreleme seçeneklerini göster Kanalları Gizle Güncellemeler sekmesinden Kanalları gizle Sohbet @@ -404,13 +404,11 @@ İndirme Klasörü İzni Basit Mod Basit Mod çoğu tema özelliğini devre dışı bırakır ve WhatsApp\'ı her zaman aktif tutan bağlantı köprüsü kapatılır. - Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Güncellemeleri Otomatik Denetle + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. Varsayılan DPI\'ı Değiştir Uygulama için DPI ayarını değiştirin. Varsayılana sıfırlamak için 0 kullanın. - No contact with custom privacy! + Özel gizlilik ile temas yok! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 7ce754dd..20ef9538 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -80,8 +80,8 @@ Dev4Mod (Contributor) 禁用置顶限制 禁用只能置顶三个联系人的限制 - 可以对全部聊天消息“在所有人设备删除” - 移除\"在所有人设备删除\"的 24 小时限制 + Increase limit of "Delete for everyone" option + Increases the limit to 3 days in the option to delete messages for everyone 禁用 显示文本 显示图标 @@ -405,12 +405,10 @@ Lite Mode Lite Mode disables most theme features and the connection bridge that keeps WhatsApp always active is turned off. Automatically Check for Update - Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application.\n - - WARNING: YOU WILL NOT BE NOTIFIED WHEN THERE\'S A NEW UPDATE, USE THIS CAREFULLY AND DON\'T REPORT ISSUE IF YOU\'RE USING OUTDATED VERSION! - - + Enable or Disable Auto Check for Update. This will disable the popup inside the WhatsApp Application. Change Default DPI Change the DPI setting for the application. Use 0 to reset to default. No contact with custom privacy! + Show chat broadcast icon + Shows an icon if the contact sent a message via broadcast From 47316ddd6db98ea0a5829e99b9a7b185a3e637c9 Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Mon, 13 Jan 2025 19:14:54 -0300 Subject: [PATCH 11/12] dump version Signed-off-by: Dev4Mod --- changelog.txt | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/changelog.txt b/changelog.txt index 8c59c31c..f9fa2371 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,14 +1,15 @@ -[NEW] -* Added a button on the home screen to view all custom privacies (You can delete them there) -* Re-added the option to enable/disable chat filter in WAE - -[BUGS FIXED] -* Fixed bug in themes, even when disabled it was still possible to change default colors -* Fixed bug in message bubble colors that did not work on the date -* Fixed bug in contact status view (did not work with applied themes) +[NEWS] +* Added a function to show an icon for received broadcast messages (works with old messages) [General -> Conversation Screen] +* Added broadcast groups to separate groups (Previously, group transmitters were not appearing anywhere after using the separate group function) [IMPROVED] -* Improvements in custom privacy +* Improvement in the "Delete for everyone" option, which now only appears for a maximum of 3 days (limitation of WhatsApp itself) + +[FIXED BUGS] +* Fixed a critical bug that prevented the update check button from being reactivated +* Fixed the colors in chat bubbles not appearing correctly (This includes the borders on media and also on stickers) +* Fixed an issue that prevented call blocking from working on current versions of WhatsApp +* Fixed a bug when showing name and biography on the home screen in WhatsApp Business -[WA ENHANCER] -* Updated Translations +[WHATSAPP / WA BUSINESS] +* Added support for beta version 2.25.1.XX From 362c580cccc8c390bce87ab91dfeaf4cbfe9a0a5 Mon Sep 17 00:00:00 2001 From: Dev4Mod Date: Mon, 13 Jan 2025 21:27:56 -0300 Subject: [PATCH 12/12] fix bug in CustomToolbar Signed-off-by: Dev4Mod --- .../features/customization/CustomToolbar.java | 104 +++++------------- 1 file changed, 28 insertions(+), 76 deletions(-) diff --git a/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java b/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java index 0bd7b2ff..b305cc78 100644 --- a/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java +++ b/app/src/main/java/com/wmods/wppenhacer/xposed/features/customization/CustomToolbar.java @@ -4,12 +4,8 @@ import android.app.Activity; import android.content.Intent; import android.os.Bundle; -import android.text.TextUtils; -import android.view.Gravity; import android.view.View; import android.view.ViewGroup; -import android.view.ViewStub; -import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.NonNull; @@ -18,7 +14,7 @@ import com.wmods.wppenhacer.xposed.core.Feature; import com.wmods.wppenhacer.xposed.core.WppCore; import com.wmods.wppenhacer.xposed.core.devkit.Unobfuscator; -import com.wmods.wppenhacer.xposed.utils.DesignUtils; +import com.wmods.wppenhacer.xposed.features.general.Others; import com.wmods.wppenhacer.xposed.utils.ReflectionUtils; import com.wmods.wppenhacer.xposed.utils.ResId; import com.wmods.wppenhacer.xposed.utils.Utils; @@ -50,6 +46,8 @@ public void doHook() throws Exception { var typeArchive = prefs.getString("typearchive", "0"); var methodHook = new MethodHook(showName, showBio, typeArchive); XposedHelpers.findAndHookMethod("com.whatsapp.HomeActivity", classLoader, "onCreate", Bundle.class, methodHook); + Others.propsBoolean.put(6481, false); + Others.propsBoolean.put(5353, true); expirationAboutInfo(); } @@ -133,84 +131,38 @@ public void onMultiClick(View v) { } if (!showBio && !showName) return; - var parent = (ViewGroup) logo.getParent(); - if (!(parent instanceof LinearLayout) && logo.getVisibility() == View.VISIBLE) { - var methods = Arrays.stream(actionbar.getClass().getDeclaredMethods()).filter(m -> m.getParameterCount() == 1 && m.getParameterTypes()[0] == CharSequence.class).toArray(Method[]::new); + var methods = Arrays.stream(actionbar.getClass().getDeclaredMethods()).filter(m -> m.getParameterCount() == 1 && m.getParameterTypes()[0] == CharSequence.class).toArray(Method[]::new); - if (showName) { - methods[1].invoke(actionbar, name); - } + if (showName) { + methods[1].invoke(actionbar, name); + } - if (showBio) { - methods[0].invoke(actionbar, bio); - } + if (showBio) { + methods[0].invoke(actionbar, bio); + } - XposedBridge.hookMethod(methods[1], new XC_MethodHook() { - @Override - protected void beforeHookedMethod(MethodHookParam param) throws Throwable { - var name = WppCore.getMyName(); - var bio = WppCore.getMyBio(); - if (showBio && (param.args[0] == "" || param.args[0] == "WhatsApp")) { - ReflectionUtils.callMethod(methods[0], param.thisObject, bio); - } else { - ReflectionUtils.callMethod(methods[0], param.thisObject, ""); - } - if (showName && (param.args[0] == "" || param.args[0] == "WhatsApp")) { - param.args[0] = name; - } - if (logo instanceof ViewStub stub) { - var layoutParams = stub.getLayoutParams(); - layoutParams.width = 1; - layoutParams.height = 200; - stub.setLayoutParams(layoutParams); - } + XposedBridge.hookMethod(methods[1], new XC_MethodHook() { + @Override + protected void beforeHookedMethod(MethodHookParam param) throws Throwable { + var name = WppCore.getMyName(); + var bio = WppCore.getMyBio(); + if (showBio && (param.args[0] == "" || param.args[0] == "WhatsApp")) { + ReflectionUtils.callMethod(methods[0], param.thisObject, bio); + } else { + ReflectionUtils.callMethod(methods[0], param.thisObject, ""); + } + if (showName && (param.args[0] == "" || param.args[0] == "WhatsApp")) { + param.args[0] = name; } - }); - return; - } - LinearLayout layout; - if (parent instanceof LinearLayout) { - layout = (LinearLayout) parent; - } else { - layout = new LinearLayout(homeActivity); - layout.setOrientation(LinearLayout.VERTICAL); - toolbar.removeAllViews(); - parent.addView(layout, 0); - var clazzWDS = XposedHelpers.findClass("com.whatsapp.wds.components.topbar.WDSToolbar", homeActivity.getClassLoader()); - if (clazzWDS.isInstance(toolbar)) { - XposedHelpers.callMethod(toolbar, "setTitle", (CharSequence) null); - XposedHelpers.findAndHookMethod(clazzWDS, "setTitle", CharSequence.class, new XC_MethodHook() { - @Override - protected void beforeHookedMethod(MethodHookParam param) throws Throwable { - if (param.thisObject != toolbar) return; - param.setResult(null); - } - }); + var layoutParams = logo.getLayoutParams(); + layoutParams.width = 1; + layoutParams.height = 1; + logo.setLayoutParams(layoutParams); + } - } - var mTitle = new TextView(homeActivity); - mTitle.setText(showName ? name : "WhatsApp"); - mTitle.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT, 1f)); - mTitle.setTextSize(18f); - mTitle.setTextColor(DesignUtils.getPrimaryTextColor()); - layout.addView(mTitle); - if (showBio) { - TextView mSubtitle = new TextView(homeActivity); - mSubtitle.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT)); - mSubtitle.setText(bio); - mSubtitle.setTextSize(12f); - mSubtitle.setTextColor(DesignUtils.getPrimaryTextColor()); - mSubtitle.setMarqueeRepeatLimit(-1); - mSubtitle.setEllipsize(TextUtils.TruncateAt.MARQUEE); - mSubtitle.setSingleLine(); - mSubtitle.setSelected(true); - layout.addView(mSubtitle); - } else { - mTitle.setGravity(Gravity.CENTER); - } - parent.removeView(logo); + }); } } }