Modifying the issue of a large number of offline messages getting stuck during synchronization

This commit is contained in:
SL 2024-05-16 17:34:24 +08:00
parent fdecdbbfbe
commit b4df8d7f1b
5 changed files with 10 additions and 6 deletions

View File

@ -77,4 +77,6 @@
### 1.3.8
* fix: Update message save remote extra method
### 1.3.9
* fix: Update RecvAckPacket header encode method
* fix: Update RecvAckPacket header encode method
### 1.3.9
* fix: Modifying the issue of a large number of offline messages getting stuck during synchronization

View File

@ -9,7 +9,7 @@
#### 安装
```
dependencies:
wukongimfluttersdk: ^1.3.9
wukongimfluttersdk: ^1.4.0
```
#### 引入
```dart

View File

@ -123,6 +123,8 @@ class ListViewShowDataState extends State<ListViewShowData> {
if (msgList[i].msg.channelID == channel.channelID &&
msgList[i].msg.channelType == channel.channelType) {
msgList[i].msg.setWkChannel(channel);
msgList[i].channelAvatar = channel.avatar;
msgList[i].channelName = channel.channelName;
setState(() {});
break;
}

View File

@ -170,7 +170,7 @@ class WKMessageManager {
}
saveRemoteExtraMsg(List<WKMsgExtra> list) async {
MessageDB.shared.insertOrUpdateMsgExtras(list);
MessageDB.shared.insertMsgExtras(list);
List<String> msgIds = [];
for (var extra in list) {
msgIds.add(extra.messageID);
@ -239,7 +239,7 @@ class WKMessageManager {
}
bool isSuccess = true;
if (msgExtraList.isNotEmpty) {
isSuccess = await MessageDB.shared.insertOrUpdateMsgExtras(msgExtraList);
isSuccess = await MessageDB.shared.insertMsgExtras(msgExtraList);
}
if (msgList.isNotEmpty) {
isSuccess = await MessageDB.shared.insertMsgList(msgList);
@ -741,7 +741,7 @@ class WKMessageManager {
list.add(msgExtra);
List<String> messageIds = [];
messageIds.add(messageID);
var result = await MessageDB.shared.insertOrUpdateMsgExtras(list);
var result = await MessageDB.shared.insertMsgExtras(list);
if (result) {
var wkMsgs = await MessageDB.shared.queryWithMessageIds(messageIds);
getMsgReactionsAndRefreshMsg(messageIds, wkMsgs);

View File

@ -15,7 +15,7 @@ description: wukong IM flutter sdk
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.3.9
version: 1.4.0
homepage: https://github.com/WuKongIM/WuKongIMFlutterSDK
environment: