From fa39c4459f0b3a800ed0a7c85b5589171bd0c9e4 Mon Sep 17 00:00:00 2001 From: gallonyin Date: Sun, 12 Mar 2023 20:28:17 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=87=AA=E5=8A=A8=E8=BF=9B=E7=BE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../worktool/service/WeworkLoopImpl.kt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/org/yameida/worktool/service/WeworkLoopImpl.kt b/app/src/main/java/org/yameida/worktool/service/WeworkLoopImpl.kt index f59a381..11e3e31 100644 --- a/app/src/main/java/org/yameida/worktool/service/WeworkLoopImpl.kt +++ b/app/src/main/java/org/yameida/worktool/service/WeworkLoopImpl.kt @@ -571,23 +571,23 @@ object WeworkLoopImpl { val tempList = itemMessageList.filter { it.feature != 0 } if (tempList.size == 2 && tempList[0].text.contains("邀请你加入群聊") && SPUtils.getInstance("groupInvite").getInt(tempList[1].text, 0) == 0) { - LogUtils.d("邀请你加入群聊: ${itemMessageList[1].text}") + LogUtils.d("邀请你加入群聊: ${tempList[1].text}") AccessibilityUtil.performClickWithSon(relativeLayoutContent) if (AccessibilityExtraUtil.loadingPage("JsWebActivity")) { - val tvButton = AccessibilityUtil.findOneByText(getRoot(), "我知道了", "加入群聊", exact = true) + val tvButton = AccessibilityUtil.findOneByText(getRoot(), "我知道了", "加入群聊", "你已接受过此邀请,无法再次加入", exact = true) val text = tvButton?.text?.toString() - if (text == "我知道了") { + if (text == "我知道了" || text == "你已接受过此邀请,无法再次加入") { backPress() - SPUtils.getInstance("groupInvite").put(itemMessageList[1].text, 1) - error("加入群聊失败: ${itemMessageList[1].text}") + SPUtils.getInstance("groupInvite").put(tempList[1].text, 1) + error("加入群聊失败: ${tempList[1].text}") } else if (text == "加入群聊") { AccessibilityUtil.performClick(tvButton) - SPUtils.getInstance("groupInvite").put(itemMessageList[1].text, 1) - LogUtils.d("加入群聊: ${itemMessageList[1].text}") - log("加入群聊: ${itemMessageList[1].text}") + SPUtils.getInstance("groupInvite").put(tempList[1].text, 1) + LogUtils.d("加入群聊: ${tempList[1].text}") + log("加入群聊: ${tempList[1].text}") } else { - LogUtils.e("加入群聊异常: ${itemMessageList[1].text}") - error("加入群聊异常: ${itemMessageList[1].text}") + LogUtils.e("加入群聊异常: ${tempList[1].text}") + error("加入群聊异常: ${tempList[1].text}") } } }