diff --git a/app/src/main/java/org/yameida/worktool/Constant.kt b/app/src/main/java/org/yameida/worktool/Constant.kt index 299705e..3edbccd 100644 --- a/app/src/main/java/org/yameida/worktool/Constant.kt +++ b/app/src/main/java/org/yameida/worktool/Constant.kt @@ -4,8 +4,8 @@ import com.blankj.utilcode.util.SPUtils object Constant { - val AVAILABLE_VERSION = arrayListOf("4.0.2", "4.0.6", "4.0.8", "4.0.10", "4.0.12", "4.0.16", "4.0.18", "4.0.19", "4.0.20", "4.1.0", "4.1.2", "4.1.3", "4.1.6", "4.1.7", "4.1.8", "4.1.9") - val AVAILABLE_VERSION_MAP = mapOf(Pair("4.0.2", 40002), Pair("4.0.6", 40006), Pair("4.0.8", 40008), Pair("4.0.10", 40010), Pair("4.0.12", 40012), Pair("4.0.16", 40016), Pair("4.0.18", 40018), Pair("4.0.19", 40019), Pair("4.0.20", 40020), Pair("4.1.0", 40100), Pair("4.1.2", 40102), Pair("4.1.3", 40103), Pair("4.1.6", 40106), Pair("4.1.7", 40107), Pair("4.1.8", 40108), Pair("4.1.9", 40109)) + val AVAILABLE_VERSION = arrayListOf("4.0.2", "4.0.6", "4.0.8", "4.0.10", "4.0.12", "4.0.16", "4.0.18", "4.0.19", "4.0.20", "4.1.0", "4.1.2", "4.1.3", "4.1.6", "4.1.7", "4.1.8", "4.1.9", "4.1.10") + val AVAILABLE_VERSION_MAP = mapOf(Pair("4.0.2", 40002), Pair("4.0.6", 40006), Pair("4.0.8", 40008), Pair("4.0.10", 40010), Pair("4.0.12", 40012), Pair("4.0.16", 40016), Pair("4.0.18", 40018), Pair("4.0.19", 40019), Pair("4.0.20", 40020), Pair("4.1.0", 40100), Pair("4.1.2", 40102), Pair("4.1.3", 40103), Pair("4.1.6", 40106), Pair("4.1.7", 40107), Pair("4.1.8", 40108), Pair("4.1.9", 40109), Pair("4.1.9", 40110)) const val PACKAGE_NAMES = "com.tencent.wework" const val WEWORK_NOTIFY = "wework_notify" const val BASE_LONG_INTERVAL = 5000L @@ -14,7 +14,7 @@ object Constant { var LONG_INTERVAL = BASE_LONG_INTERVAL var CHANGE_PAGE_INTERVAL = BASE_CHANGE_PAGE_INTERVAL var POP_WINDOW_INTERVAL = BASE_POP_WINDOW_INTERVAL - private const val DEFAULT_HOST = "wss://worktool.asrtts.cn" + private const val DEFAULT_HOST = "wss://api.worktool.ymdyes.cn" var version = Int.MAX_VALUE var myName = "" 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 87dba39..aed104d 100644 --- a/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt +++ b/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt @@ -1711,7 +1711,7 @@ object WeworkOperationImpl { } else { LogUtils.e("未搜索到结果: ${friend.name}") uploadCommandResult(message, ExecCallbackBean.ERROR_BUTTON, "未搜索到结果: ${friend.name}", startTime, listOf(), listOf(friend.name)) - val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", exact = true) != null + val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", "暂无搜索结果", exact = true) != null LogUtils.e("企微: 无搜索结果: $noResult") return false } @@ -1792,7 +1792,7 @@ object WeworkOperationImpl { } else { LogUtils.e("未搜索到结果: ${friend.name}") uploadCommandResult(message, ExecCallbackBean.ERROR_BUTTON, "未搜索到结果: ${friend.name}", startTime, listOf(), listOf(friend.name)) - val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", exact = true) != null + val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", "暂无搜索结果", exact = true) != null LogUtils.e("企微: 无搜索结果: $noResult") return false } @@ -2214,7 +2214,7 @@ object WeworkOperationImpl { selectResult.failList.add(select) LogUtils.e("未搜索到结果: $select") error("未搜索到结果: $select") - val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", exact = true) != null + val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", "暂无搜索结果", exact = true) != null LogUtils.e("企微: 无搜索结果: $noResult") } sleep(Constant.POP_WINDOW_INTERVAL) @@ -2456,7 +2456,7 @@ object WeworkOperationImpl { error("拉人失败 找不到: $select") } } - val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", exact = true) != null + val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", "暂无搜索结果", exact = true) != null val textView = AccessibilityUtil.findOnceByClazz(getRoot(), Views.TextView) if (textView != null && textView.text.isNullOrBlank()) { AccessibilityUtil.performClick(textView) @@ -2606,7 +2606,7 @@ object WeworkOperationImpl { } } } - val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", exact = true) != null + val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", "暂无搜索结果", exact = true) != null val textView = AccessibilityUtil.findOnceByClazz(getRoot(), Views.TextView) if (textView != null && textView.text.isNullOrBlank()) { AccessibilityUtil.performClick(textView) @@ -2984,7 +2984,7 @@ object WeworkOperationImpl { } else { LogUtils.e("未搜索到结果: $title") error("未搜索到结果: $title") - val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", exact = true) != null + val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", "暂无搜索结果", exact = true) != null LogUtils.e("企微: 无搜索结果: $noResult") } } else { diff --git a/app/src/main/java/org/yameida/worktool/utils/WeworkRoomUtil.kt b/app/src/main/java/org/yameida/worktool/utils/WeworkRoomUtil.kt index 799af78..31378bf 100644 --- a/app/src/main/java/org/yameida/worktool/utils/WeworkRoomUtil.kt +++ b/app/src/main/java/org/yameida/worktool/utils/WeworkRoomUtil.kt @@ -144,7 +144,7 @@ object WeworkRoomUtil { } } else { LogUtils.e("未搜索到结果") - val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", exact = true) != null + val noResult = AccessibilityUtil.findOnceByText(getRoot(), "无搜索结果", "暂无搜索结果", exact = true) != null LogUtils.e("企微: 无搜索结果: $noResult") } } else {