Skip to content

Commit

Permalink
fix: BaseBubbleBuilderHook on TIM_NT
Browse files Browse the repository at this point in the history
  • Loading branch information
HdShare committed Nov 25, 2024
1 parent ab0e43c commit 92d0bc3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/main/java/me/ketal/dispacher/BaseBubbleBuilderHook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ import android.view.ViewGroup
import cc.hicore.QApp.QAppUtils
import cc.ioctl.hook.msg.MultiForwardAvatarHook
import cc.ioctl.util.HookUtils
import com.github.kyuubiran.ezxhelper.utils.findMethodOrNull
import com.tencent.qqnt.kernel.nativeinterface.MsgRecord
import io.github.qauxv.util.xpcompat.XC_MethodHook
import io.github.qauxv.base.annotation.FunctionHookEntry
import io.github.qauxv.hook.BasePersistBackgroundHook
import io.github.qauxv.util.Initiator
import io.github.qauxv.util.xpcompat.XC_MethodHook
import me.ketal.hook.ChatItemShowQQUin
import me.ketal.hook.ShowMsgAt
import me.singleneuron.data.MsgRecordData
Expand All @@ -58,7 +59,9 @@ object BaseBubbleBuilderHook : BasePersistBackgroundHook() {
override fun initOnce(): Boolean {
if (QAppUtils.isQQnt()) {
val kAIOBubbleMsgItemVB = Initiator.loadClass("com.tencent.mobileqq.aio.msglist.holder.AIOBubbleMsgItemVB")
val getHostView = kAIOBubbleMsgItemVB.getMethod("getHostView")
val getHostView = kAIOBubbleMsgItemVB.findMethodOrNull(true) {
modifiers == Modifier.PUBLIC && returnType == View::class.java && parameterTypes.isEmpty()
} ?: kAIOBubbleMsgItemVB.getMethod("getHostView")
val kAIOMsgItem = Initiator.loadClass("com.tencent.mobileqq.aio.msg.AIOMsgItem")
val bindMethod = kAIOBubbleMsgItemVB.declaredMethods.single {
val argt = it.parameterTypes
Expand Down

0 comments on commit 92d0bc3

Please sign in to comment.