Skip to content

Commit

Permalink
fix: HideFrameTabUnreadMsgCount, HideFrameTabUnreadMsgCount on TIM_NT
Browse files Browse the repository at this point in the history
  • Loading branch information
HdShare committed Dec 11, 2024
1 parent f584caf commit d7b5a06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ import io.github.qauxv.base.annotation.UiItemAgentEntry
import io.github.qauxv.dsl.FunctionEntryRouter
import io.github.qauxv.hook.CommonSwitchFunctionHook
import io.github.qauxv.util.QQVersion
import io.github.qauxv.util.TIMVersion
import io.github.qauxv.util.dexkit.CFrameControllerInjectImpl
import io.github.qauxv.util.dexkit.DexKit
import io.github.qauxv.util.requireMinQQVersion
import io.github.qauxv.util.requireMinTimVersion
import xyz.nextalone.util.clazz
import xyz.nextalone.util.method
import xyz.nextalone.util.replace
Expand All @@ -51,7 +53,7 @@ object HideFrameTabUnreadMsgCount : CommonSwitchFunctionHook(arrayOf(CFrameContr
"com.tencent.mobileqq.activity.home.impl.TabFrameControllerImpl".clazz?.method("updateRedTouch")
?.replace(this, null)
DexKit.requireClassFromCache(CFrameControllerInjectImpl).let {
if (requireMinQQVersion(QQVersion.QQ_9_0_8)) {
if (requireMinQQVersion(QQVersion.QQ_9_0_8) || requireMinTimVersion(TIMVersion.TIM_4_0_95)) {
Reflex.findSingleMethod(
it, Void.TYPE, false,
"com.tencent.mobileqq.quibadge.QUIBadge".clazz,
Expand Down
8 changes: 6 additions & 2 deletions app/src/main/java/xyz/nextalone/hook/SimplifyChatLongItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ import io.github.qauxv.base.annotation.FunctionHookEntry
import io.github.qauxv.base.annotation.UiItemAgentEntry
import io.github.qauxv.dsl.FunctionEntryRouter
import io.github.qauxv.util.QQVersion
import io.github.qauxv.util.TIMVersion
import io.github.qauxv.util.requireMinQQVersion
import io.github.qauxv.util.requireMinTimVersion
import xyz.nextalone.base.MultiItemDelayableHook
import xyz.nextalone.util.clazz
import xyz.nextalone.util.method
Expand Down Expand Up @@ -78,9 +80,11 @@ object SimplifyChatLongItem : MultiItemDelayableHook("na_simplify_chat_long_item
private var getName: Method? = null

override fun initOnce() = throwOrTrue {
if (QAppUtils.isQQnt()) {
if (QAppUtils.isQQnt() || requireMinTimVersion(TIMVersion.TIM_4_0_95)) {
mutableListOf("com/tencent/qqnt/aio/menu/ui/QQCustomMenuNoIconLayout").apply {
if (requireMinQQVersion(QQVersion.QQ_9_0_0)) add(0, "com/tencent/qqnt/aio/menu/ui/QQCustomMenuExpandableLayout")
if (requireMinQQVersion(QQVersion.QQ_9_0_0) || requireMinTimVersion(TIMVersion.TIM_4_0_95)) {
add(0, "com/tencent/qqnt/aio/menu/ui/QQCustomMenuExpandableLayout")
}
}.firstNotNullOf { it.clazz }
.method("setMenu")!!
.hookBefore {
Expand Down

0 comments on commit d7b5a06

Please sign in to comment.