mirror of
https://github.com/WuKongIM/WuKongIMAndroidSDK
synced 2025-06-03 23:58:19 +00:00
update attachment message
This commit is contained in:
parent
2e1f27c781
commit
a448c9f301
Binary file not shown.
@ -0,0 +1 @@
|
||||
fc7e56e766cb1b1c8e845c117bdcafc2
|
@ -0,0 +1 @@
|
||||
1737b378da4494a6c6da5ac402e89a0c53dad1b8
|
@ -0,0 +1 @@
|
||||
8e9cc229a52989936c617a38f4b21b06abc9216e21f68a9369e51bcf6dc38bec
|
@ -0,0 +1 @@
|
||||
2cf35aa1e588773e4f37ad6d7431b771a0d6875a0601e558e9aa4c4e79ada00f1c0a0311a9f27d774c588f09f0662123d66aa30f1978d1e5c43d0943b4798446
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.xinbida.wukongim</groupId>
|
||||
<artifactId>WKIMLib_loca</artifactId>
|
||||
<version>1.0.7</version>
|
||||
<packaging>aar</packaging>
|
||||
</project>
|
@ -0,0 +1 @@
|
||||
6498b4614db03e1905bf001469cf95fa
|
@ -0,0 +1 @@
|
||||
ce43a2b1beb2ca1154356fa7a58990513fbfcaf5
|
@ -0,0 +1 @@
|
||||
2256a0f7a1909d270406d96d1bbee652f83f215d3594de4de1e4fc3153f1ba43
|
@ -0,0 +1 @@
|
||||
e0ba06d4ca0412ea3db840f193369a48db5fbc60eb0745042a35e96e3ccb8dad3acc3f09bec4dbcef7cee13806ea68d431ac28aceaa316f5168177039accf7b3
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<metadata>
|
||||
<groupId>com.xinbida.wukongim</groupId>
|
||||
<artifactId>WKIMLib_loca</artifactId>
|
||||
<versioning>
|
||||
<latest>1.0.7</latest>
|
||||
<release>1.0.7</release>
|
||||
<versions>
|
||||
<version>1.0.7</version>
|
||||
</versions>
|
||||
<lastUpdated>20230919082143</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
@ -0,0 +1 @@
|
||||
bf70a4b25686a36531e5812426c61bdd
|
@ -0,0 +1 @@
|
||||
0170f3072d6c52cd1733a155cea8e60f4e1c032b
|
@ -0,0 +1 @@
|
||||
0fc320880d91b42a96a13b46ce2e2ff273e58f2928c6cb9d622c230ffc67052b
|
@ -0,0 +1 @@
|
||||
6240b3cce8b60a314eb03c83e4068ed0ac7bb280c8c2e5afbca71c6f7a30d20394896f1186426c2c88703401c6d1f76a2813496d3332e56c7b80e6b6c2097f83
|
@ -29,6 +29,7 @@ import org.json.JSONObject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@ -332,14 +333,37 @@ public class ConversationManager extends BaseManager {
|
||||
MsgManager.getInstance().saveMsgReactions(msgReactionList);
|
||||
}
|
||||
// fixme 离线消息应该不能push给UI
|
||||
if (msgList.size() > 0 && msgList.size() < 20) {
|
||||
Collections.sort(msgList, new Comparator<WKMsg>() {
|
||||
@Override
|
||||
public int compare(WKMsg o1, WKMsg o2) {
|
||||
return Long.compare(o1.messageSeq, o2.messageSeq);
|
||||
if (msgList.size() > 0) {
|
||||
HashMap<String, List<WKMsg>> allMsgMap = new HashMap<>();
|
||||
for (WKMsg wkMsg : msgList) {
|
||||
if (TextUtils.isEmpty(wkMsg.channelID)) continue;
|
||||
List<WKMsg> list;
|
||||
if (allMsgMap.containsKey(wkMsg.channelID)) {
|
||||
list = allMsgMap.get(wkMsg.channelID);
|
||||
if (list == null) {
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
} else {
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
});
|
||||
MsgManager.getInstance().pushNewMsg(msgList);
|
||||
list.add(wkMsg);
|
||||
allMsgMap.put(wkMsg.channelID, list);
|
||||
}
|
||||
|
||||
for (Map.Entry<String, List<WKMsg>> entry : allMsgMap.entrySet()) {
|
||||
List<WKMsg> channelMsgList = entry.getValue();
|
||||
if (channelMsgList != null && channelMsgList.size() < 20) {
|
||||
Collections.sort(channelMsgList, new Comparator<WKMsg>() {
|
||||
@Override
|
||||
public int compare(WKMsg o1, WKMsg o2) {
|
||||
return Long.compare(o1.messageSeq, o2.messageSeq);
|
||||
}
|
||||
});
|
||||
MsgManager.getInstance().pushNewMsg(channelMsgList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (uiMsgList.size() > 0) {
|
||||
for (int i = 0, size = uiMsgList.size(); i < size; i++) {
|
||||
|
@ -146,7 +146,7 @@ public class WKConnection {
|
||||
if (lastRequestId.equals(requestId)) {
|
||||
WKConnection.this.ip = ip;
|
||||
WKConnection.this.port = port;
|
||||
WKLoggerUtils.getInstance().e("连接的IP和Port" + ip + ":" + port);
|
||||
WKLoggerUtils.getInstance().e("连接地址" + ip + ":" + port);
|
||||
if (connectionIsNull()) {
|
||||
new Thread(WKConnection.this::connSocket).start();
|
||||
}
|
||||
@ -487,8 +487,9 @@ public class WKConnection {
|
||||
//存在附件处理
|
||||
WKIM.getInstance().getMsgManager().setUploadAttachment(msg, (isSuccess, messageContent) -> {
|
||||
if (isSuccess) {
|
||||
msg.baseContentMsgModel = messageContent;
|
||||
WKIM.getInstance().getMsgManager().updateContentAndRefresh(msg.clientMsgNO, msg.baseContentMsgModel, false);
|
||||
if (!sendingMsgHashMap.containsKey((int) msg.clientSeq)) {
|
||||
msg.baseContentMsgModel = messageContent;
|
||||
WKSendMsg base1 = WKProto.getInstance().getSendBaseMsg(msg);
|
||||
addSendingMsg(base1);
|
||||
sendMessage(base1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user