mirror of
https://github.com/WuKongIM/WuKongIMFlutterSDK
synced 2025-05-29 23:22:52 +00:00
fix: Optimization of loading channel messages without the latest messages and multiple synchronization issues
This commit is contained in:
parent
6459f2ed7e
commit
e57a9a505c
@ -61,4 +61,6 @@
|
||||
### 1.3.0
|
||||
* Modification of sending messages containing replies error
|
||||
### 1.3.1
|
||||
* fix: synchronization channel message multiple synchronization issue
|
||||
* fix: synchronization channel message multiple synchronization issue
|
||||
### 1.3.2
|
||||
* fix: Optimization of loading channel messages without the latest messages and multiple synchronization issues
|
@ -9,7 +9,7 @@
|
||||
#### 安装
|
||||
```
|
||||
dependencies:
|
||||
wukongimfluttersdk: ^1.3.1
|
||||
wukongimfluttersdk: ^1.3.2
|
||||
```
|
||||
#### 引入
|
||||
```dart
|
||||
|
@ -140,7 +140,7 @@ class ChatListDataState extends State<ChatList> {
|
||||
|
||||
getMsgList(int oldestOrderSeq, int pullMode, bool isReset) {
|
||||
WKIM.shared.messageManager.getOrSyncHistoryMessages(channelID, channelType,
|
||||
oldestOrderSeq, oldestOrderSeq == 0, pullMode, 20, 0, (list) {
|
||||
oldestOrderSeq, oldestOrderSeq == 0, pullMode, 10, 0, (list) {
|
||||
List<UIMsg> uiList = [];
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
if (pullMode == 0 && !isReset) {
|
||||
|
@ -320,7 +320,6 @@ class MessageDB {
|
||||
//获取原始数据
|
||||
List<WKMsg> list = await getMessages(
|
||||
channelId, channelType, oldestOrderSeq, contain, pullMode, limit);
|
||||
print("查询总数量${list.length}");
|
||||
//业务判断数据
|
||||
List<WKMsg> tempList = [];
|
||||
for (int i = 0, size = list.length; i < size; i++) {
|
||||
@ -360,6 +359,10 @@ class MessageDB {
|
||||
} else {
|
||||
oldestMsgSeq = oldestOrderSeq ~/ 1000;
|
||||
}
|
||||
if (oldestMsgSeq == 1) {
|
||||
iGetOrSyncHistoryMsgBack(list);
|
||||
return;
|
||||
}
|
||||
if (pullMode == 0) {
|
||||
//下拉获取消息
|
||||
if (maxMessageSeq != 0 &&
|
||||
|
12
pubspec.lock
12
pubspec.lock
@ -389,6 +389,14 @@ packages:
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
sprintf:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sprintf
|
||||
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
sqflite:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -465,10 +473,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: uuid
|
||||
sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313"
|
||||
sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.0.7"
|
||||
version: "4.3.3"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -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.1
|
||||
version: 1.3.2
|
||||
homepage: https://github.com/WuKongIM/WuKongIMFlutterSDK
|
||||
|
||||
environment:
|
||||
@ -41,7 +41,7 @@ dependencies:
|
||||
encryptions: ^1.1.0+1
|
||||
hex: ^0.2.0
|
||||
crypto: ^3.0.3
|
||||
uuid: ^3.0.7
|
||||
uuid: ^4.3.3
|
||||
web_socket_channel: ^2.4.0
|
||||
dio: ^5.3.2
|
||||
encryptor: ^0.0.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user