Skip to content

Commit

Permalink
fix: AntiNickBlock on QQ9.0.20 after version
Browse files Browse the repository at this point in the history
Closes #1153
  • Loading branch information
HdShare committed Aug 26, 2024
1 parent 7ab7f35 commit df8ab6e
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions app/src/main/java/cn/lliiooll/hook/AntiNickBlock.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ import com.github.kyuubiran.ezxhelper.utils.paramCount
import io.github.qauxv.base.annotation.FunctionHookEntry
import io.github.qauxv.base.annotation.UiItemAgentEntry
import io.github.qauxv.dsl.FunctionEntryRouter.Locations.Simplify
import io.github.qauxv.util.Log
import io.github.qauxv.util.QQVersion
import io.github.qauxv.util.dexkit.DexKitTarget
import io.github.qauxv.util.requireMinQQVersion
import me.ketal.util.hookMethod
import xyz.nextalone.base.MultiItemDelayableHook
Expand Down Expand Up @@ -63,17 +61,31 @@ object AntiNickBlock : MultiItemDelayableHook(
// arrayList.add(com.tencent.mobileqq.activity.qcircle.c.class);
//
// com.tencent.mobileqq.aio.msglist.holder.component.nick.block.AbsNickBlockProvider:
// 9.0.20 -> com.tencent.mobileqq.aio.msglist.holder.component.nick.block.d
// 9.0.20~9.0.56 -> .super Lcom/tencent/mobileqq/aio/msglist/holder/component/nick/block/d;
// 9.0.60 -> .super Lcom/tencent/mobileqq/aio/msglist/holder/component/nick/block/b;
//
//public class ? extends com.tencent.mobileqq.aio.msglist.holder.component.nick.block.AbsNickBlockProvider
val providerList = arrayOf(
"com.tencent.mobileqq.vas.vipicon.g",// com.tencent.mobileqq.vas.vipicon.VasNickBlockProvider
when {
requireMinQQVersion(QQVersion.QQ_9_0_60) -> "com.tencent.mobileqq.activity.qcircle.h"
requireMinQQVersion(QQVersion.QQ_9_0_35) -> "com.tencent.mobileqq.activity.qcircle.e"
requireMinQQVersion(QQVersion.QQ_9_0_30) -> "com.tencent.mobileqq.activity.qcircle.f"
else -> "com.tencent.mobileqq.activity.qcircle.c"
},
when {// com.tencent.mobileqq.aio.msglist.holder.component.nick.block.NickBlockProvider
requireMinQQVersion(QQVersion.QQ_9_0_60) -> "com.tencent.mobileqq.aio.msglist.holder.component.nick.block.c"
requireMinQQVersion(QQVersion.QQ_9_0_30) -> "com.tencent.mobileqq.aio.msglist.holder.component.nick.block.e"
else -> "com.tencent.mobileqq.aio.msglist.holder.component.nick.block.f"
},
when {// com.tencent.mobileqq.vas.vipicon.VasNickBlockProvider
requireMinQQVersion(QQVersion.QQ_9_0_60) -> "com.tencent.mobileqq.vas.vipicon.b"
else -> "com.tencent.mobileqq.vas.vipicon.g"
},
when {// com.tencent.qqnt.aio.nick.ExtNickBlockProvider
requireMinQQVersion(QQVersion.QQ_9_0_60) -> "com.tencent.qqnt.aio.nick.e"
requireMinQQVersion(QQVersion.QQ_9_0_20) -> "com.tencent.qqnt.aio.nick.g"
else -> "com.tencent.qqnt.aio.nick.f"
},
"com.tencent.mobileqq.aio.msglist.holder.component.nick.block.f",// com.tencent.mobileqq.aio.msglist.holder.component.nick.block.NickBlockProvider
"com.tencent.mobileqq.activity.qcircle.c",// com.tencent.mobileqq.activity.qcircle.c
)

val callBack = HookUtils.afterIfEnabled(this) { param ->
Expand Down

0 comments on commit df8ab6e

Please sign in to comment.