Skip to content

Commit

Permalink
fix: createItemIconNt on TIM_NT
Browse files Browse the repository at this point in the history
  • Loading branch information
HdShare committed Dec 13, 2024
1 parent 8ff8a71 commit 9eaff36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/io/github/qauxv/util/CustomMenu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ object CustomMenu {
*/
@JvmStatic
fun createItemIconNt(msg: Any, text: String, icon: Int, id: Int, click: () -> Unit): Any {
if (!requireMinQQVersion(QQVersion.QQ_9_0_0)) return createItemNt(msg, text, id, click)
if (!requireMinQQVersion(QQVersion.QQ_9_0_0) && !requireMinTimVersion(TIMVersion.TIM_4_0_95)) return createItemNt(msg, text, id, click)
val msgClass = Initiator.loadClass("com.tencent.mobileqq.aio.msg.AIOMsgItem")
val absMenuItem = DexKit.requireClassFromCache(AbstractQQCustomMenuItem)
val (iconName, idName) = absMenuItem.findAllMethods { returnType == Int::class.java && parameterTypes.isEmpty() }.map { it.name }
Expand Down

0 comments on commit 9eaff36

Please sign in to comment.