Skip to content

Commit

Permalink
fix: DisableAvatarDecoration on chat on QQNT
Browse files Browse the repository at this point in the history
Signed-off-by: Hicores <me@hicore.cc>
  • Loading branch information
Hicores committed Jun 21, 2023
1 parent 0f5c619 commit 5f2ac94
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

import android.view.View;
import androidx.annotation.NonNull;
import cc.hicore.QApp.QAppUtils;
import cc.ioctl.util.HookUtils;
import com.tencent.qqnt.kernel.nativeinterface.VASMsgAvatarPendant;
import io.github.qauxv.base.annotation.FunctionHookEntry;
import io.github.qauxv.base.annotation.UiItemAgentEntry;
import io.github.qauxv.dsl.FunctionEntryRouter.Locations.Simplify;
Expand Down Expand Up @@ -56,7 +58,10 @@ public String[] getUiItemLocation() {
}

@Override
public boolean initOnce() {
public boolean initOnce() throws NoSuchMethodException {
if (QAppUtils.isQQnt()){
HookUtils.hookBeforeIfEnabled(this, VASMsgAvatarPendant.class.getDeclaredMethod("getPendantId"),param -> param.setResult(0L));
}
for (Method m : Initiator.load("com.tencent.mobileqq.vas.PendantInfo").getDeclaredMethods()) {
if (m.getReturnType() == void.class) {
Class<?>[] argt = m.getParameterTypes();
Expand Down

0 comments on commit 5f2ac94

Please sign in to comment.