update 多转发优化

This commit is contained in:
gallonyin
2023-09-16 21:49:27 +08:00
parent e68ee027b1
commit 01fc76991c

View File

@@ -484,11 +484,19 @@ object WeworkOperationImpl {
return false return false
} }
if (relaySelectTarget(titleList, extraText, timeout = 10000)) { if (relaySelectTarget(titleList, extraText, timeout = 10000)) {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信") if (titleList.size > 1) {
AccessibilityUtil.performClick(stayButton) AccessibilityExtraUtil.loadingPage("CommonSelectActivity")
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf()) AccessibilityUtil.waitForPageMissing("CommonSelectActivity")
goHome() uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
return true goHome()
return true
} else {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信")
AccessibilityUtil.performClick(stayButton)
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
}
} else { } else {
LogUtils.e("微盘文件转发失败: $objectName") LogUtils.e("微盘文件转发失败: $objectName")
if (retryCount > 0) { if (retryCount > 0) {
@@ -766,11 +774,19 @@ object WeworkOperationImpl {
return false return false
} }
if (relaySelectTarget(titleList, extraText, timeout = 10000)) { if (relaySelectTarget(titleList, extraText, timeout = 10000)) {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信") if (titleList.size > 1) {
AccessibilityUtil.performClick(stayButton) AccessibilityExtraUtil.loadingPage("CommonSelectActivity")
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf()) AccessibilityUtil.waitForPageMissing("CommonSelectActivity")
goHome() uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
return true goHome()
return true
} else {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信")
AccessibilityUtil.performClick(stayButton)
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
}
} else { } else {
LogUtils.e("文件转发失败: $objectName") LogUtils.e("文件转发失败: $objectName")
if (retryCount > 0) { if (retryCount > 0) {
@@ -848,11 +864,19 @@ object WeworkOperationImpl {
return false return false
} }
if (relaySelectTarget(titleList, extraText, timeout = 10000)) { if (relaySelectTarget(titleList, extraText, timeout = 10000)) {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信") if (titleList.size > 1) {
AccessibilityUtil.performClick(stayButton) AccessibilityExtraUtil.loadingPage("CommonSelectActivity")
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf()) AccessibilityUtil.waitForPageMissing("CommonSelectActivity")
goHome() uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
return true goHome()
return true
} else {
val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信")
AccessibilityUtil.performClick(stayButton)
uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf())
goHome()
return true
}
} else { } else {
LogUtils.e("文件转发失败: $objectName") LogUtils.e("文件转发失败: $objectName")
if (retryCount > 0) { if (retryCount > 0) {