Skip to content

Commit

Permalink
fix: DisableDropSticker for QQNT
Browse files Browse the repository at this point in the history
  • Loading branch information
klxiaoniu committed Jun 20, 2023
1 parent d5a9362 commit 6537939
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/src/main/java/cc/ioctl/hook/chat/DisableDropSticker.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
package cc.ioctl.hook.chat;

import androidx.annotation.NonNull;
import cc.hicore.QApp.QAppUtils;
import cc.ioctl.util.HookUtils;
import cc.ioctl.util.Reflex;
import io.github.qauxv.base.annotation.FunctionHookEntry;
Expand Down Expand Up @@ -62,7 +63,13 @@ public boolean isApplicationRestartRequired() {

@Override
public boolean initOnce() throws ReflectiveOperationException {
Class<?> kAioAnimationConfigHelper = Initiator.loadClass("com.tencent.mobileqq.activity.aio.anim.AioAnimationConfigHelper");
String className;
if (QAppUtils.isQQnt()) {
className = "com.tencent.mobileqq.aio.animation.util.AioAnimationConfigHelper";
} else {
className = "com.tencent.mobileqq.activity.aio.anim.AioAnimationConfigHelper";
}
Class<?> kAioAnimationConfigHelper = Initiator.loadClass(className);
Method doParseRules = Reflex.findSingleMethod(kAioAnimationConfigHelper, ArrayList.class, false, org.xmlpull.v1.XmlPullParser.class);
HookUtils.hookBeforeIfEnabled(this, doParseRules, param -> param.setResult(new ArrayList<>()));
return true;
Expand Down

0 comments on commit 6537939

Please sign in to comment.