diff --git a/app/src/main/java/io/github/qauxv/util/dexkit/DexKitTarget.kt b/app/src/main/java/io/github/qauxv/util/dexkit/DexKitTarget.kt index 2a0e6950fe..2321b32150 100644 --- a/app/src/main/java/io/github/qauxv/util/dexkit/DexKitTarget.kt +++ b/app/src/main/java/io/github/qauxv/util/dexkit/DexKitTarget.kt @@ -783,3 +783,10 @@ data object AIOPicElementType: DexKitTarget.UsingStr() { override val traitString = arrayOf("PicElement(origPath="); override val filter = DexKitFilter.strInClsName("com/tencent/qqnt/aio/"); } + +data object MultiSelectToBottomIntent: DexKitTarget.UsingStr() { + override val findMethod: Boolean = false; + override val declaringClass = "com.tencent.mobileqq.aio.input.multiselect.c.toBottomIntent"; + override val traitString = arrayOf("SelectToBottom(dividingLineTop="); + override val filter = DexKitFilter.strInClsName("com/tencent/mobileqq/aio/input/multiselect"); +} diff --git a/app/src/main/java/me/ketal/hook/MultiActionHook.kt b/app/src/main/java/me/ketal/hook/MultiActionHook.kt index fe42fe6312..9873dd144a 100644 --- a/app/src/main/java/me/ketal/hook/MultiActionHook.kt +++ b/app/src/main/java/me/ketal/hook/MultiActionHook.kt @@ -67,7 +67,8 @@ object MultiActionHook : CommonSwitchFunctionHook( CMessageCache, CMessageRecordFactory, NBaseChatPie_createMulti, - CMultiMsgManager + CMultiMsgManager, + MultiSelectToBottomIntent ) ), SessionHooker.IAIOParamUpdate { @@ -115,13 +116,14 @@ object MultiActionHook : CommonSwitchFunctionHook( ) setMargin(rootView) } - val intentClass = Initiator.loadClass("com.tencent.mobileqq.aio.input.multiselect.c\$h") + val intentClass = DexKit.requireClassFromCache(MultiSelectToBottomIntent); val multiSelectUtilClazz = Initiator.loadClass("com.tencent.mobileqq.aio.msglist.holder.component.multifoward.b") Initiator.loadClass("com.tencent.mobileqq.aio.input.multiselect.MultiSelectBarVM") .method("handleIntent")!! .hookBefore(this) { // 劫持一个 intent 自己传参 val intent = it.args[0] + if (intent.javaClass.isAssignableFrom(intentClass)) { val flags = Reflex.getFirstByType(intent, Int::class.java) if (flags != -114514) return@hookBefore @@ -138,6 +140,7 @@ object MultiActionHook : CommonSwitchFunctionHook( it.result = null } } + } private fun recall(ctx: Context) { @@ -176,7 +179,7 @@ object MultiActionHook : CommonSwitchFunctionHook( private fun recallNt(ctx: Context, vb: Any) { runCatching { val baseVB = Initiator.loadClass("com.tencent.mvi.mvvm.BaseVB") - val intentClass = Initiator.loadClass("com.tencent.mobileqq.aio.input.multiselect.c\$h") + val intentClass = DexKit.requireClassFromCache(MultiSelectToBottomIntent) val flags: Int = -114514 val intent = intentClass.newInstance(args(flags), argTypes(Int::class.java))!! baseVB.method("sendIntent")!!.invoke(vb, intent)