Skip to content

Commit 91b3cbb

Browse files
committed
feat: HideEmoReplyLayout
Closes #1499
1 parent 3f1f27f commit 91b3cbb

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

app/src/main/java/io/github/qauxv/util/dexkit/DexKitTarget.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,3 +1177,14 @@ data object Hd_QuickReplayPaiYiPai_Method : DexKitTarget.UsingStringVector() {
11771177
override val declaringClass = ""
11781178
override val filter = DexKitFilter.allowAll
11791179
}
1180+
1181+
data object Hd_HideEmoReplyLayout_Method : DexKitTarget.UsingStr() {
1182+
override val findMethod = true
1183+
override val traitString = arrayOf("mBinding.msgTailContainer")
1184+
override val declaringClass = "Lcom/tencent/mobileqq/aio/msglist/holder/template/AIOReceiverBubbleTemplate;"
1185+
override val filter = DexKitFilter.strInClsName(declaringClass) and
1186+
filter@{ it: DexMethodDescriptor ->
1187+
val m = kotlin.runCatching { it.getMethodInstance(getHostClassLoader()) }.getOrNull() ?: return@filter false
1188+
m.returnType == View::class.java
1189+
}
1190+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* QAuxiliary - An Xposed module for QQ/TIM
3+
* Copyright (C) 2019-2025 QAuxiliary developers
4+
* https://github.com/cinit/QAuxiliary
5+
*
6+
* This software is an opensource software: you can redistribute it
7+
* and/or modify it under the terms of the General Public License
8+
* as published by the Free Software Foundation; either
9+
* version 3 of the License, or any later version as published
10+
* by QAuxiliary contributors.
11+
*
12+
* This software is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15+
* See the General Public License for more details.
16+
*
17+
* You should have received a copy of the General Public License
18+
* along with this software.
19+
* If not, see
20+
* <https://github.com/cinit/QAuxiliary/blob/master/LICENSE.md>.
21+
*/
22+
23+
package me.hd.hook
24+
25+
import android.view.View
26+
import cc.ioctl.util.hookAfterIfEnabled
27+
import com.github.kyuubiran.ezxhelper.utils.setViewZeroSize
28+
import io.github.qauxv.base.annotation.FunctionHookEntry
29+
import io.github.qauxv.base.annotation.UiItemAgentEntry
30+
import io.github.qauxv.dsl.FunctionEntryRouter
31+
import io.github.qauxv.hook.CommonSwitchFunctionHook
32+
import io.github.qauxv.util.QQVersion
33+
import io.github.qauxv.util.dexkit.DexKit
34+
import io.github.qauxv.util.dexkit.Hd_HideEmoReplyLayout_Method
35+
import io.github.qauxv.util.requireMinQQVersion
36+
37+
@FunctionHookEntry
38+
@UiItemAgentEntry
39+
object HideEmoReplyLayout : CommonSwitchFunctionHook(
40+
targets = arrayOf(Hd_HideEmoReplyLayout_Method)
41+
) {
42+
43+
override val name = "隐藏表情表态"
44+
override val description = "隐藏消息底部的表情回应布局"
45+
override val uiItemLocation = FunctionEntryRouter.Locations.Simplify.UI_CHAT_MSG
46+
override val isAvailable = requireMinQQVersion(QQVersion.QQ_9_1_35)
47+
48+
override fun initOnce(): Boolean {
49+
hookAfterIfEnabled(DexKit.requireMethodFromCache(Hd_HideEmoReplyLayout_Method)) { param ->
50+
val layout = param.result as View
51+
layout.setViewZeroSize()
52+
}
53+
return true
54+
}
55+
}

0 commit comments

Comments
 (0)