fix at单字母

This commit is contained in:
gallonyin
2023-04-05 17:47:09 +08:00
parent 939bf7c022
commit 401cc25ca7

View File

@@ -2034,6 +2034,7 @@ object WeworkOperationImpl {
} }
} }
atList.removeIf { it.startsWith("#regex#") } atList.removeIf { it.startsWith("#regex#") }
LogUtils.v("atList: ${atList.joinToString()}")
atList.forEachIndexed { index, at -> atList.forEachIndexed { index, at ->
if (index == 0) { if (index == 0) {
AccessibilityUtil.findTextInput(getRoot(), "@") AccessibilityUtil.findTextInput(getRoot(), "@")
@@ -2048,7 +2049,7 @@ object WeworkOperationImpl {
val container = AccessibilityUtil.findBackNode(searchFlag, minChildCount = 2)?.parent val container = AccessibilityUtil.findBackNode(searchFlag, minChildCount = 2)?.parent
if (container != null) { if (container != null) {
val atNode = AccessibilityUtil.findOnceByTextRegex(container, "${RegexHelper.reverseRegexTitle(at)}(@.*)?") val atNode = AccessibilityUtil.findOnceByTextRegex(container, "${RegexHelper.reverseRegexTitle(at)}(@.*)?")
if (atNode != null) { if (atNode != null && !at.matches("^[A-Z#]$".toRegex())) {
AccessibilityUtil.performClick(atNode) AccessibilityUtil.performClick(atNode)
} else { } else {
AccessibilityUtil.findTextInput(getRoot(), at) AccessibilityUtil.findTextInput(getRoot(), at)