Skip to content

Commit

Permalink
update 自动进群
Browse files Browse the repository at this point in the history
  • Loading branch information
gallonyin committed Mar 12, 2023
1 parent dc6d248 commit fa39c44
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/src/main/java/org/yameida/worktool/service/WeworkLoopImpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
}
}
}
Expand Down

0 comments on commit fa39c44

Please sign in to comment.