File tree Expand file tree Collapse file tree
app/src/main/java/momoi/mod/qqpro Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ object MsgUtil {
1717 val msgUtilApi = MsgUtilApiImpl ()
1818
1919 fun summary (elements : List <MsgElement >): CharSequence {
20- if (elements[0 ].elementType == ElementType .GREY_TIP ) {
20+ if (elements.isEmpty() || elements [0 ].elementType == ElementType .GREY_TIP ) {
2121 // subElementType == 1
2222 return " [原消息已被撤回]"
2323 }
@@ -64,6 +64,27 @@ object MsgUtil {
6464 content = Json (it.bytesData).str(" prompt" ) ? : " [卡片信息]"
6565 }
6666 }
67+ ele.faceElement?.let {
68+ ele.faceElement = null
69+ ele.elementType = ElementType .TEXT
70+ ele.textElement = TextElement ().apply {
71+ content = it.faceText
72+ }
73+ }
74+ ele.marketFaceElement?.let {
75+ ele.marketFaceElement = null
76+ ele.elementType = ElementType .TEXT
77+ ele.textElement = TextElement ().apply {
78+ content = it.faceName
79+ }
80+ }
81+ ele.faceBubbleElement?.let {
82+ ele.faceBubbleElement = null
83+ ele.elementType = ElementType .TEXT
84+ ele.textElement = TextElement ().apply {
85+ content = it.faceSummary
86+ }
87+ }
6788 }
6889 return MsgListUtilKt .a(elements)
6990 }
You can’t perform that action at this time.
0 commit comments