Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ShowMsgCount(QUIBadge) on TIM NT 4.0.98 #1310

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MoonLeeeaf
Copy link
Contributor

@MoonLeeeaf MoonLeeeaf commented Jan 20, 2025

标题 / Title Here

为 TIM NT 适配 ShowMsgCount
虽然压根没适配到多少()

也就看着 QUIBadge 完全一样才改的控制流(x

描述 / Description

如上()

另外修改了此功能的说明

无法进行测试, 理论上更改控制流的部分能正常运行

修复或解决的问题 / Issues Fixed or Closed by This PR

暂时还不知道()

检查列表 / Check List

  • 我已经在预期的 QQ 或 TIM 版本上测试了这些更改,并确认它们能够正常工作,不会破坏任何东西(尽我所能)。
    I have tested these changes on the expected version and confirmed that they work and don't break anything (as well as I can manage).
  • 我的改动不会导致本模块丢失对旧版 QQ 或 TIM 的支持。
    My changes will not cause this module to lose support for older versions of QQ or TIM。
  • 我已经合并了对后续工作无意义的提交,并确认它们不会对后续维护造成破坏。(必须)
    I have merged commits that are meaningless for follow-up work and confirmed that they will not cause damage to follow-up maintenance. (Required)

附件(未被加入到代码中):

// 一开始写了一坨 后面发现底下有和我要处理的一模一样的功能
// 例如 QUI Badge (下面给的第一个方法签名) 在源代码底下就有
// 为了防止错误的 Hook 减少测试量 这段代码暂时摆在这
if (requireMinTimVersion(TIMVersion.TIM_4_0_98)) {
            // 关键词: 99+

            // QUI Badge (byd怎么这么多)
            // 1. Lcom/tencent/mobileqq/quibadge/QUIBadge;->updateNum(I)V
            // 2. Lcom/tencent/qqnt/widget/badgeview/QBadgeView;->t(I)Lcom/tencent/qqnt/widget/badgeview/a;
            // 3. Lcom/tencent/qqmini/sdk/core/utils/CustomWidgetUtil;->updateCustomNoteTxt(Landroid/widget/TextView;I)V
            
            // 群助手(?)消息
            // Lcom/tencent/mobileqq/activity/recent/msgbox/FilterMsgBoxFragment;->V6()V
            Initiator.loadClass("com.tencent.mobileqq.activity.recent.msgbox.FilterMsgBoxFragment")
                .getDeclaredMethod("V6", null)
                .hookBefore { param -> param.result = null }

            // 未知
            // Lcom/tencent/mobileqq/activity/recent/msgbox/TempMsgBoxFragment;->R6(Lcom/tencent/imcore/message/QQMessageFacade;)V
            Initiator.loadClass("com.tencent.mobileqq.activity.recent.msgbox.FilterMsgBoxFragment")
                .getDeclaredMethod("R6", Initiator.loadClass('com.tencent.imcore.message.QQMessageFacade'))
                .hookBefore { param -> param.result = null }
            
            // 群设置(?)
            // Lcom/tencent/mobileqq/activity/TroopAssisSettingActivity;->updateUnreadNumOnTitleBar()V
            // 有些复杂 暂时还啃不动()

            // 主页对话(?)
            // Lcom/tencent/mobileqq/activity/home/Conversation;->getLastActivityName()Ljava/lang/String;

            // 最近消息
            // Lcom/tencent/mobileqq/activity/recent/RecentUtil;->G(Landroid/app/Activity;Lcom/tencent/mobileqq/app/QQAppInterface;Lcom/tencent/mobileqq/data/RecentUser;)V
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant