Skip to content

Commit

Permalink
refactor: UnlockLeftSlipLimit for QQNT
Browse files Browse the repository at this point in the history
  • Loading branch information
klxiaoniu committed Aug 21, 2023
1 parent fe86e2e commit 9355dc1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions app/src/main/java/cc/hicore/hook/UnlockLeftSlipLimit.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import cc.hicore.ReflectUtil.MMethod;
import cc.ioctl.util.HookUtils;
import cc.ioctl.util.HostInfo;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;
import io.github.qauxv.base.annotation.FunctionHookEntry;
import io.github.qauxv.base.annotation.UiItemAgentEntry;
import io.github.qauxv.dsl.FunctionEntryRouter;
Expand Down Expand Up @@ -58,13 +60,13 @@ public String[] getUiItemLocation() {
@Override
protected boolean initOnce() throws Exception {
if (HostInfo.requireMinQQVersion(QQVersion.QQ_8_9_63)) {
Method[] ms = Initiator.loadClass("com.tencent.mobileqq.aio.msglist.holder.component.leftswipearea.AIOContentLeftSwipeHelper").getDeclaredMethods();
for (Method m : ms) {
if (m.getParameterTypes().length == 1 && m.getParameterTypes()[0] == boolean.class) {
HookUtils.hookBeforeIfEnabled(this, m, param -> param.args[0] = true);
break;
}
}
XposedHelpers.findAndHookMethod(Initiator.loadClass("com.tencent.mobileqq.ark.api.impl.ArkHelperImpl"), "isSupportReply", String.class,
String.class, String.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) {
param.setResult(true);
}
});
return true;
}
Method m = MMethod.FindMethod(DexKit.requireMethodFromCache(NLeftSwipeReplyHelper_reply.INSTANCE).getDeclaringClass(), methodName, boolean.class,
Expand Down

0 comments on commit 9355dc1

Please sign in to comment.