Skip to content

Commit

Permalink
fix: UnlockLeftSlipLimit for QQNT
Browse files Browse the repository at this point in the history
  • Loading branch information
klxiaoniu committed Jul 16, 2023
1 parent a53e528 commit 156253d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/src/main/java/cc/hicore/hook/UnlockLeftSlipLimit.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import io.github.qauxv.base.annotation.UiItemAgentEntry;
import io.github.qauxv.dsl.FunctionEntryRouter;
import io.github.qauxv.hook.CommonSwitchFunctionHook;
import io.github.qauxv.util.Initiator;
import io.github.qauxv.util.QQVersion;
import io.github.qauxv.util.dexkit.DexKit;
import io.github.qauxv.util.dexkit.DexKitTarget;
Expand All @@ -56,6 +57,16 @@ 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;
}
}
return true;
}
Method m = MMethod.FindMethod(DexKit.requireMethodFromCache(NLeftSwipeReplyHelper_reply.INSTANCE).getDeclaringClass(), methodName, boolean.class,
new Class[0]);
HookUtils.hookBeforeIfEnabled(this, m, param -> param.setResult(true));
Expand Down

0 comments on commit 156253d

Please sign in to comment.