update 文件和视频转发优化
This commit is contained in:
@@ -340,13 +340,22 @@ object WeworkTextUtil {
|
|||||||
if (nameList.isEmpty()) {
|
if (nameList.isEmpty()) {
|
||||||
val backNode = getMessageListNode(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_CONTACT)
|
val backNode = getMessageListNode(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_CONTACT)
|
||||||
if (backNode != null) {
|
if (backNode != null) {
|
||||||
val textNode = AccessibilityUtil.findOnceByText(backNode, replyContent)
|
if ((replyTextType == WeworkMessageBean.TEXT_TYPE_IMAGE)
|
||||||
if (textNode != null && replyContent.isNotEmpty()) {
|
&& (replyTextType == getTextTypeFromItem(item))) {
|
||||||
LogUtils.d("nameList: $nameList\nreplyContent: $replyContent")
|
LogUtils.d("nameList: $nameList\nreplyContent: $replyContent")
|
||||||
return longClickMessageItem(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_CONTACT, key)
|
return longClickMessageItem(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_CONTACT, key)
|
||||||
} else if ((replyTextType == WeworkMessageBean.TEXT_TYPE_IMAGE
|
}
|
||||||
|| replyTextType == WeworkMessageBean.TEXT_TYPE_VIDEO)
|
if ((replyTextType == WeworkMessageBean.TEXT_TYPE_FILE || replyTextType == WeworkMessageBean.TEXT_TYPE_VIDEO)
|
||||||
&& (replyTextType == getTextTypeFromItem(item))) {
|
&& replyContent.contains("###")) {
|
||||||
|
val replyContentList = replyContent.split("###")
|
||||||
|
if (AccessibilityUtil.findOnceByText(backNode, replyContentList[0]) != null
|
||||||
|
&& AccessibilityUtil.findOnceByText(backNode, replyContentList[1]) != null) {
|
||||||
|
LogUtils.d("nameList: $nameList\nreplyContent: $replyContent")
|
||||||
|
return longClickMessageItem(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_GROUP, key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val textNode = AccessibilityUtil.findOnceByText(backNode, replyContent)
|
||||||
|
if (textNode != null && replyContent.isNotEmpty()) {
|
||||||
LogUtils.d("nameList: $nameList\nreplyContent: $replyContent")
|
LogUtils.d("nameList: $nameList\nreplyContent: $replyContent")
|
||||||
return longClickMessageItem(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_CONTACT, key)
|
return longClickMessageItem(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_CONTACT, key)
|
||||||
}
|
}
|
||||||
@@ -356,13 +365,22 @@ object WeworkTextUtil {
|
|||||||
if (name == replyNick) {
|
if (name == replyNick) {
|
||||||
val backNode = getMessageListNode(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_GROUP)
|
val backNode = getMessageListNode(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_GROUP)
|
||||||
if (backNode != null) {
|
if (backNode != null) {
|
||||||
val textNode = AccessibilityUtil.findOnceByText(backNode, replyContent)
|
if ((replyTextType == WeworkMessageBean.TEXT_TYPE_IMAGE)
|
||||||
if (textNode != null && replyContent.isNotEmpty()) {
|
&& (replyTextType == getTextTypeFromItem(item))) {
|
||||||
LogUtils.d("nameList: $nameList\nreplyContent: $replyContent")
|
LogUtils.d("nameList: $nameList\nreplyContent: $replyContent")
|
||||||
return longClickMessageItem(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_GROUP, key)
|
return longClickMessageItem(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_GROUP, key)
|
||||||
} else if ((replyTextType == WeworkMessageBean.TEXT_TYPE_IMAGE
|
}
|
||||||
|| replyTextType == WeworkMessageBean.TEXT_TYPE_VIDEO)
|
if ((replyTextType == WeworkMessageBean.TEXT_TYPE_FILE || replyTextType == WeworkMessageBean.TEXT_TYPE_VIDEO)
|
||||||
&& (replyTextType == getTextTypeFromItem(item))) {
|
&& replyContent.contains("###")) {
|
||||||
|
val replyContentList = replyContent.split("###")
|
||||||
|
if (AccessibilityUtil.findOnceByText(backNode, replyContentList[0]) != null
|
||||||
|
&& AccessibilityUtil.findOnceByText(backNode, replyContentList[1]) != null) {
|
||||||
|
LogUtils.d("nameList: $nameList\nreplyContent: $replyContent")
|
||||||
|
return longClickMessageItem(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_GROUP, key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val textNode = AccessibilityUtil.findOnceByText(backNode, replyContent)
|
||||||
|
if (textNode != null && replyContent.isNotEmpty()) {
|
||||||
LogUtils.d("nameList: $nameList\nreplyContent: $replyContent")
|
LogUtils.d("nameList: $nameList\nreplyContent: $replyContent")
|
||||||
return longClickMessageItem(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_GROUP, key)
|
return longClickMessageItem(item, WeworkMessageBean.ROOM_TYPE_INTERNAL_GROUP, key)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user