update 兼容群名获取
This commit is contained in:
@@ -316,8 +316,11 @@ object WeworkGetImpl {
|
||||
val weworkMessageBean = WeworkMessageBean()
|
||||
weworkMessageBean.type = WeworkMessageBean.GET_GROUP_INFO
|
||||
val tvManagerFlag = AccessibilityUtil.findOneByText(getRoot(), "全部群成员", "微信用户创建", timeout = 2000)
|
||||
if (tvManagerFlag != null && tvManagerFlag.text.contains("微信用户创建")) {
|
||||
val button = AccessibilityUtil.findFrontNode(tvManagerFlag)
|
||||
if (tvManagerFlag?.text?.toString()?.contains("微信用户创建") == true) {
|
||||
var button = AccessibilityUtil.findFrontNode(tvManagerFlag)
|
||||
if (button?.className == Views.ImageView) {
|
||||
button = AccessibilityUtil.findFrontNode(button)
|
||||
}
|
||||
val tvGroupName = AccessibilityUtil.findOnceByClazz(button, Views.TextView)
|
||||
if (tvGroupName != null && tvGroupName.text != null) {
|
||||
LogUtils.d("群名: " + tvGroupName.text)
|
||||
|
||||
@@ -2286,7 +2286,7 @@ object WeworkOperationImpl {
|
||||
if (WeworkRoomUtil.intoGroupManager()) {
|
||||
val textView = AccessibilityUtil.findOneByText(getRoot(), "全部群成员", "微信用户创建")
|
||||
?: return false
|
||||
if (textView.text.contains("微信用户创建")) {
|
||||
if (textView.text?.toString()?.contains("微信用户创建") == true) {
|
||||
var button = AccessibilityUtil.findFrontNode(textView)
|
||||
if (button?.className == Views.ImageView) {
|
||||
button = AccessibilityUtil.findFrontNode(button)
|
||||
@@ -3087,7 +3087,7 @@ object WeworkOperationImpl {
|
||||
(WeworkRoomUtil.intoRoom(groupName) && WeworkRoomUtil.intoGroupManager())) {
|
||||
val tvList = AccessibilityUtil.findAllOnceByClazz(getRoot(), Views.TextView)
|
||||
tvList.forEachIndexed { index, tv ->
|
||||
if (tv.text != null && tv.text.contains("微信用户创建")) {
|
||||
if (tv.text?.toString()?.contains("微信用户创建") == true) {
|
||||
if (index + 1 < tvList.size) {
|
||||
val tvQr = tvList[index + 1]
|
||||
AccessibilityUtil.performClick(tvQr)
|
||||
|
||||
Reference in New Issue
Block a user