Skip to content

Commit

Permalink
update 多转发优化
Browse files Browse the repository at this point in the history
  • Loading branch information
gallonyin committed Sep 16, 2023
1 parent e68ee02 commit 01fc769
Showing 1 changed file with 39 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,19 @@ object WeworkOperationImpl {
return false
}
if (relaySelectTarget(titleList, extraText, timeout = 10000)) {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信")
AccessibilityUtil.performClick(stayButton)
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
if (titleList.size > 1) {
AccessibilityExtraUtil.loadingPage("CommonSelectActivity")
AccessibilityUtil.waitForPageMissing("CommonSelectActivity")
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
} else {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信")
AccessibilityUtil.performClick(stayButton)
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
}
} else {
LogUtils.e("微盘文件转发失败: $objectName")
if (retryCount > 0) {
Expand Down Expand Up @@ -766,11 +774,19 @@ object WeworkOperationImpl {
return false
}
if (relaySelectTarget(titleList, extraText, timeout = 10000)) {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信")
AccessibilityUtil.performClick(stayButton)
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
if (titleList.size > 1) {
AccessibilityExtraUtil.loadingPage("CommonSelectActivity")
AccessibilityUtil.waitForPageMissing("CommonSelectActivity")
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
} else {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信")
AccessibilityUtil.performClick(stayButton)
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
}
} else {
LogUtils.e("文件转发失败: $objectName")
if (retryCount > 0) {
Expand Down Expand Up @@ -848,11 +864,19 @@ object WeworkOperationImpl {
return false
}
if (relaySelectTarget(titleList, extraText, timeout = 10000)) {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信")
AccessibilityUtil.performClick(stayButton)
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
if (titleList.size > 1) {
AccessibilityExtraUtil.loadingPage("CommonSelectActivity")
AccessibilityUtil.waitForPageMissing("CommonSelectActivity")
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
} else {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信")
AccessibilityUtil.performClick(stayButton)
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
}
} else {
LogUtils.e("文件转发失败: $objectName")
if (retryCount > 0) {
Expand Down

0 comments on commit 01fc769

Please sign in to comment.