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