From 3ab72fb87b04fa7c969a03c29ab16ec336aefce2 Mon Sep 17 00:00:00 2001 From: gallonyin Date: Sat, 29 Jul 2023 10:31:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update=20text=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/layout/activity_settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 8f93deb..6b9ba49 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -458,7 +458,7 @@ From 9a2503d5e3a00e33054a55612a1bec4b22d2c109 Mon Sep 17 00:00:00 2001 From: gallonyin Date: Sun, 30 Jul 2023 23:41:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update=20=E5=BE=AA=E7=8E=AF=E5=8E=BB?= =?UTF-8?q?=E9=87=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../worktool/service/WeworkOperationImpl.kt | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) 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 93f681b..e16fc1a 100644 --- a/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt +++ b/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt @@ -13,6 +13,7 @@ import java.io.File import java.lang.Exception import java.text.SimpleDateFormat import java.util.* +import kotlin.collections.LinkedHashSet /** @@ -43,7 +44,7 @@ object WeworkOperationImpl { } val successList = arrayListOf() val failList = arrayListOf() - for (title in titleList) { + for (title in LinkedHashSet(titleList)) { var successFlag = true if (WeworkRoomUtil.intoRoom(title) || WeworkRoomUtil.intoRoom(title, fastIn = false)) { if (sendChatMessage(receivedContent, at = at, atList = atList, title = title)) { @@ -106,7 +107,7 @@ object WeworkOperationImpl { } val successList = arrayListOf() val failList = arrayListOf() - for (title in titleList) { + for (title in LinkedHashSet(titleList)) { if (WeworkRoomUtil.intoRoom(title) || WeworkRoomUtil.intoRoom(title, fastIn = false)) { if (WeworkTextUtil.longClickMessageItem( //聊天消息列表 1ListView 0RecycleView xViewGroup @@ -179,7 +180,7 @@ object WeworkOperationImpl { extraText: String? = null ): Boolean { val startTime = System.currentTimeMillis() - for (title in titleList) { + for (title in LinkedHashSet(titleList)) { if (WeworkRoomUtil.intoRoom(title) || WeworkRoomUtil.intoRoom(title, fastIn = false)) { if (!receivedName.isNullOrEmpty()) { if (WeworkTextUtil.longClickMessageItem( @@ -868,7 +869,7 @@ object WeworkOperationImpl { textType: Int ): Boolean { val startTime = System.currentTimeMillis() - for (title in titleList) { + for (title in LinkedHashSet(titleList)) { if (WeworkRoomUtil.intoRoom(title) || WeworkRoomUtil.intoRoom(title, fastIn = false)) { if (WeworkTextUtil.longClickMyMessageItem( //聊天消息列表 1ListView 0RecycleView xViewGroup @@ -1112,7 +1113,7 @@ object WeworkOperationImpl { LogUtils.d("receivedName $receivedName textType $textType originalContent $originalContent") return relayMessage(message, titleList, receivedName, originalContent, textType, nameList, extraText) } - for (title in titleList) { + for (title in LinkedHashSet(titleList)) { if (WeworkRoomUtil.intoRoom(title) || WeworkRoomUtil.intoRoom(title, fastIn = false)) { var hasOpenMulti = false for (subMessageBean in messageList) { @@ -1786,7 +1787,7 @@ object WeworkOperationImpl { textType: Int ): Boolean { val startTime = System.currentTimeMillis() - for (groupName in titleList) { + for (groupName in LinkedHashSet(titleList)) { if (WeworkRoomUtil.intoRoom(groupName) && WeworkRoomUtil.intoGroupManager()) { val groupInfo = WeworkGetImpl.getGroupInfoDetail() groupInfo.titleList = arrayListOf(groupName) @@ -1826,7 +1827,7 @@ object WeworkOperationImpl { AccessibilityUtil.performClick(multiButton) AccessibilityUtil.performClick(searchButton) var isSelect = false - for (select in selectList) { + for (select in LinkedHashSet(selectList)) { val needTrim = select.contains(Constant.regTrimTitle) val trimTitle = select.replace(Constant.regTrimTitle, "") AccessibilityUtil.findTextInput(getRoot(), trimTitle) @@ -2030,7 +2031,7 @@ object WeworkOperationImpl { if (textViewList.size >= 2) { val multiButton = textViewList.lastOrNull() var count = 0 - for (select in selectList) { + for (select in LinkedHashSet(selectList)) { val needTrim = select.contains(Constant.regTrimTitle) val trimTitle = select.replace(Constant.regTrimTitle, "") AccessibilityUtil.performClick(multiButton) @@ -2155,7 +2156,7 @@ object WeworkOperationImpl { if (textViewList.size >= 2) { val multiButton = textViewList.lastOrNull() var count = 0 - for (select in removeList) { + for (select in LinkedHashSet(removeList)) { val needTrim = select.contains(Constant.regTrimTitle) val trimTitle = select.replace(Constant.regTrimTitle, "") AccessibilityUtil.performClick(multiButton) @@ -2423,7 +2424,7 @@ object WeworkOperationImpl { } atList.removeIf { it.startsWith("#regex#") } LogUtils.v("atList: ${atList.joinToString()}") - atList.forEachIndexed { index, at -> + LinkedHashSet(atList).forEachIndexed { index, at -> if (index == 0) { AccessibilityUtil.findTextInput(getRoot(), "@") } else {