diff --git a/app/src/main/java/cc/ioctl/hook/troop/TroopFileRename.kt b/app/src/main/java/cc/ioctl/hook/troop/TroopFileRename.kt index 97279ece3e..cbab5afea8 100644 --- a/app/src/main/java/cc/ioctl/hook/troop/TroopFileRename.kt +++ b/app/src/main/java/cc/ioctl/hook/troop/TroopFileRename.kt @@ -65,15 +65,13 @@ object TroopFileRename : PluginDelayableHook("ketal_TroopFileRename"), View.OnCl override val isAvailable = requireMinQQVersion(QQVersion.QQ_8_6_0) override fun startHook(classLoader: ClassLoader) = throwOrTrue { - val builder = if (requireMinQQVersion(QQVersion.QQ_8_9_0)) { - "com.tencent.mobileqq.troop.widget.g" - } else { - "com.tencent.mobileqq.troop.widget.TroopFileItemBuilder" - }.findClass(classLoader) + val builderClzName = if (requireMinQQVersion(QQVersion.QQ_8_9_88)) "h" + else if (requireMinQQVersion(QQVersion.QQ_8_9_0)) "g" + else "TroopFileItemBuilder" + val builder = ("com.tencent.mobileqq.troop.widget.$builderClzName").findClass(classLoader) builder.declaredMethods.find { val args = it.parameterTypes - it.returnType == Void.TYPE - && args[1].equals(View::class.java) + it.returnType == Void.TYPE && args[1].equals(View::class.java) }?.hookBefore(this) { val ctx = it.args[0] val obj = it.args[2] as Array<*> @@ -96,8 +94,11 @@ object TroopFileRename : PluginDelayableHook("ketal_TroopFileRename"), View.OnCl } } - val clazzName = if (requireMinQQVersion(QQVersion.QQ_8_9_0)) "c" else "TrooFileTextViewMenuBuilder" - val updateRightMenuItem = "Lcom/tencent/mobileqq/troop/widget/$clazzName;->updateRightMenuItem(ILjava/lang/Object;Lcom/tencent/widget/SwipRightMenuBuilder\$SwipRightMenuItem;Landroid/view/View\$OnClickListener;)Landroid/view/View;".method + val clazzName = if (requireMinQQVersion(QQVersion.QQ_8_9_88)) "d" + else if (requireMinQQVersion(QQVersion.QQ_8_9_0)) "c" + else "TrooFileTextViewMenuBuilder" + val updateRightMenuItem = + "Lcom/tencent/mobileqq/troop/widget/$clazzName;->updateRightMenuItem(ILjava/lang/Object;Lcom/tencent/widget/SwipRightMenuBuilder\$SwipRightMenuItem;Landroid/view/View\$OnClickListener;)Landroid/view/View;".method updateRightMenuItem.hookAfter(this) { val obj = it.args[1] as Array<*> val info = TroopFileInfo(obj[1]!!) @@ -159,6 +160,7 @@ object TroopFileRename : PluginDelayableHook("ketal_TroopFileRename"), View.OnCl }) } setNegativeButton("取消") { _, _ -> } + setCancelable(false) }.show() } } diff --git a/app/src/main/java/io/github/qauxv/util/QQVersion.java b/app/src/main/java/io/github/qauxv/util/QQVersion.java index 567d4d0490..f5dc1d6498 100644 --- a/app/src/main/java/io/github/qauxv/util/QQVersion.java +++ b/app/src/main/java/io/github/qauxv/util/QQVersion.java @@ -105,5 +105,5 @@ private QQVersion() { public static final long QQ_8_9_80 = 4614; public static final long QQ_8_9_83 = 4680; public static final long qq_8_9_85 = 4766; - public static final long QQ_8_9_88_12880 = 4790; // beta + public static final long QQ_8_9_88 = 4852; } diff --git a/app/src/main/java/me/ketal/hook/ChatItemShowQQUin.kt b/app/src/main/java/me/ketal/hook/ChatItemShowQQUin.kt index 90b539aa84..4690e574ec 100644 --- a/app/src/main/java/me/ketal/hook/ChatItemShowQQUin.kt +++ b/app/src/main/java/me/ketal/hook/ChatItemShowQQUin.kt @@ -96,7 +96,7 @@ object ChatItemShowQQUin : CommonConfigFunctionHook(), OnBubbleBuilder { // X2J_APT <- ???Binding <- AIOSenderBubbleTemplate private val NAME_TAIL_LAYOUT = when { - requireMinQQVersion(QQVersion.QQ_8_9_88_12880) -> "slv" + requireMinQQVersion(QQVersion.QQ_8_9_88) -> "slx" requireMinQQVersion(QQVersion.qq_8_9_85) -> "sih" requireMinQQVersion(QQVersion.QQ_8_9_83) -> "shv" requireMinQQVersion(QQVersion.QQ_8_9_80) -> "sg6"