From cb2e6406951684b65bc2434fcadaf8c4dd76f5d7 Mon Sep 17 00:00:00 2001 From: gallonyin Date: Sun, 10 Sep 2023 23:21:10 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=BD=AC=E5=8F=91=E5=90=8E=E5=9B=9E?= =?UTF-8?q?=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yameida/worktool/service/WeworkOperationImpl.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt b/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt index 700e23a..7d4a7ab 100644 --- a/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt +++ b/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt @@ -196,6 +196,7 @@ object WeworkOperationImpl { if (relaySelectTarget(nameList, extraText)) { LogUtils.d("$title: 转发成功") uploadCommandResult(message, ExecCallbackBean.SUCCESS, "$title: 转发成功", startTime, titleList, listOf()) + goHome() return true } else { LogUtils.d("$title: 转发失败 $originalContent") @@ -221,6 +222,7 @@ object WeworkOperationImpl { if (relaySelectTarget(nameList, extraText)) { LogUtils.d("$title: 转发成功") uploadCommandResult(message, ExecCallbackBean.SUCCESS, "$title: 转发成功", startTime, titleList, listOf()) + goHome() return true } else { LogUtils.d("$title: 转发失败 $originalContent") @@ -485,6 +487,7 @@ object WeworkOperationImpl { val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信") AccessibilityUtil.performClick(stayButton) uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf()) + goHome() return true } else { LogUtils.e("微盘文件转发失败: $objectName") @@ -552,6 +555,7 @@ object WeworkOperationImpl { AccessibilityUtil.performClick(shareFileButton) if (relaySelectTarget(titleList, extraText)) { uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf()) + goHome() return true } else { LogUtils.e("微盘文件转发失败: $objectName") @@ -659,6 +663,7 @@ object WeworkOperationImpl { AccessibilityUtil.performClick(shareFileButton) if (relaySelectTarget(titleList, extraText)) { uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf()) + goHome() return true } else { LogUtils.e("微盘文件转发失败: $objectName") @@ -764,6 +769,7 @@ object WeworkOperationImpl { val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信") AccessibilityUtil.performClick(stayButton) uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf()) + goHome() return true } else { LogUtils.e("文件转发失败: $objectName") @@ -845,6 +851,7 @@ object WeworkOperationImpl { val stayButton = AccessibilityUtil.findOneByText(getRoot(), "留在企业微信") AccessibilityUtil.performClick(stayButton) uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf()) + goHome() return true } else { LogUtils.e("文件转发失败: $objectName") @@ -1262,6 +1269,7 @@ object WeworkOperationImpl { if (relaySelectTarget(nameList, extraText)) { LogUtils.d("$groupName: 转发成功") uploadCommandResult(message, ExecCallbackBean.SUCCESS, "$groupName: 转发成功", startTime, nameList, listOf()) + goHome() return true } else { LogUtils.e("$groupName: 转发失败") @@ -1419,6 +1427,7 @@ object WeworkOperationImpl { if (relaySelectTarget(nameList, extraText)) { LogUtils.d("$title: 转发成功") uploadCommandResult(message, ExecCallbackBean.SUCCESS, "$title: 转发成功", startTime, nameList, listOf()) + goHome() return true } else { LogUtils.e("$title: 转发失败") @@ -1816,6 +1825,7 @@ object WeworkOperationImpl { LogUtils.e("添加参与人成功") if (AccessibilityUtil.findTextAndClick(getRoot(), "保存并发送到聊天", "保存并建群发送")) { uploadCommandResult(message, ExecCallbackBean.SUCCESS, "", startTime, titleList, listOf()) + goHome() return true } else { LogUtils.e("未找到保存并发送按钮")