diff --git a/app/src/main/java/cc/ioctl/hook/sideswipe/SimplifyQQSettingMe.kt b/app/src/main/java/cc/ioctl/hook/sideswipe/SimplifyQQSettingMe.kt index 19a400b80a..333410b7b4 100644 --- a/app/src/main/java/cc/ioctl/hook/sideswipe/SimplifyQQSettingMe.kt +++ b/app/src/main/java/cc/ioctl/hook/sideswipe/SimplifyQQSettingMe.kt @@ -31,7 +31,6 @@ import androidx.core.view.forEachIndexed import androidx.core.view.get import androidx.core.view.size import cc.ioctl.util.HookUtils -import com.github.kyuubiran.ezxhelper.utils.findAllMethods import com.github.kyuubiran.ezxhelper.utils.findMethod import com.github.kyuubiran.ezxhelper.utils.getStaticObjectOrNull import com.github.kyuubiran.ezxhelper.utils.hookAfter @@ -238,15 +237,13 @@ object SimplifyQQSettingMe : MultiItemDelayableHook("SimplifyQQSettingMe") { if (requireMinQQVersion(QQVersion.QQ_8_9_88)) "com.tencent.mobileqq.QQSettingMeViewV9" else "com.tencent.mobileqq.activity.QQSettingMeViewV9" ) - clazz?.findAllMethods { paramCount == 1 && parameterTypes[0].name.contains("com.tencent.mobileqq.activity.qqsettingme") }?.hookAfter { + if (clazz != null) { val cz = clazz.superclass.superclass val m = cz.findMethod { returnType == View::class.java && paramCount == 1 && parameterTypes[0] == String::class.java } - for (activeItem in activeItems) { - if (items2Hide.contains(activeItem)) { - val viewObj = m.invoke(null, items2Hide[activeItem]) - if (viewObj != null) { - val view = viewObj as View - view.visibility = View.GONE + m.hookAfter { + for (activeItem in activeItems) { + if (items2Hide[activeItem] == it.args[0]) { + (it.result as View).setViewZeroSize() } } } diff --git a/app/src/main/java/io/github/qauxv/tlb/QQConfigTable.kt b/app/src/main/java/io/github/qauxv/tlb/QQConfigTable.kt index 26640e7226..0d65b459ec 100644 --- a/app/src/main/java/io/github/qauxv/tlb/QQConfigTable.kt +++ b/app/src/main/java/io/github/qauxv/tlb/QQConfigTable.kt @@ -63,6 +63,7 @@ import io.github.qauxv.util.QQVersion.QQ_8_9_68 import io.github.qauxv.util.QQVersion.QQ_8_9_70 import io.github.qauxv.util.QQVersion.QQ_8_9_8 import io.github.qauxv.util.QQVersion.QQ_8_9_90 +import io.github.qauxv.util.QQVersion.QQ_9_0_0 import me.ketal.hook.SortAtPanel import xyz.nextalone.hook.ChatWordsCount @@ -123,6 +124,7 @@ class QQConfigTable : ConfigTableInterface { QQ_8_9_28 to "m0", QQ_8_9_68 to "l0", QQ_8_9_90 to "i0", + QQ_9_0_0 to "f0", ), SortAtPanel.sessionInfoTroopUin to mapOf( 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 1380431bd9..fbdc6883c4 100644 --- a/app/src/main/java/io/github/qauxv/util/QQVersion.java +++ b/app/src/main/java/io/github/qauxv/util/QQVersion.java @@ -108,4 +108,5 @@ private QQVersion() { public static final long QQ_8_9_88 = 4852; public static final long QQ_8_9_90 = 4938; public static final long QQ_8_9_93_BETA_13315 = 4964; + public static final long QQ_9_0_0 = 5220; //beta1 }