From fed9b13008f3f05e733ca3dfec0d87c0871ec0c1 Mon Sep 17 00:00:00 2001 From: hd Date: Mon, 25 Nov 2024 18:32:10 +0800 Subject: [PATCH] fix: ChatItemShowQQUin on TIM_NT Closes #1254 --- app/src/main/java/me/ketal/hook/ChatItemShowQQUin.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/me/ketal/hook/ChatItemShowQQUin.kt b/app/src/main/java/me/ketal/hook/ChatItemShowQQUin.kt index 15f75e31d8..0e86728908 100644 --- a/app/src/main/java/me/ketal/hook/ChatItemShowQQUin.kt +++ b/app/src/main/java/me/ketal/hook/ChatItemShowQQUin.kt @@ -57,7 +57,6 @@ import com.github.kyuubiran.ezxhelper.utils.invokeMethod import com.github.kyuubiran.ezxhelper.utils.newInstance import com.lxj.xpopup.util.XPopupUtils import com.tencent.qqnt.kernel.nativeinterface.MsgRecord -import io.github.qauxv.util.xpcompat.XC_MethodHook import io.github.qauxv.R import io.github.qauxv.base.IUiItemAgent import io.github.qauxv.base.annotation.UiItemAgentEntry @@ -71,8 +70,11 @@ import io.github.qauxv.hook.CommonConfigFunctionHook import io.github.qauxv.ui.CommonContextWrapper import io.github.qauxv.ui.CustomDialog import io.github.qauxv.util.QQVersion +import io.github.qauxv.util.TIMVersion import io.github.qauxv.util.Toasts import io.github.qauxv.util.requireMinQQVersion +import io.github.qauxv.util.requireMinTimVersion +import io.github.qauxv.util.xpcompat.XC_MethodHook import kotlinx.coroutines.flow.MutableStateFlow import me.ketal.dispacher.BaseBubbleBuilderHook import me.ketal.dispacher.OnBubbleBuilder @@ -369,7 +371,7 @@ object ChatItemShowQQUin : CommonConfigFunctionHook(), OnBubbleBuilder { val isFlashPicTagNeedShow = FlashPicHook.INSTANCE.isInitializationSuccessful && isFlashPicNt(chatMessage) if (!isEnabled && !isFlashPicTagNeedShow) return - if (requireMinQQVersion(QQVersion.QQ_8_9_63_BETA_11345)) { + if (requireMinQQVersion(QQVersion.QQ_8_9_63_BETA_11345) || requireMinTimVersion(TIMVersion.TIM_4_0_95)) { if (!rootView.children.map { it.id }.contains(ID_ADD_LAYOUT)) { val layout = LinearLayout(rootView.context).apply { layoutParams = ConstraintLayout.LayoutParams(