diff --git a/CHANGELOG.md b/CHANGELOG.md index a81520a..d44ea47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,4 +31,6 @@ ### 1.1.5 * update connnection device id with uid ### 1.1.6 - * New features such as message likes and replies added \ No newline at end of file + * New features such as message likes and replies added + ### 1.1.7 + * Modifying message parsing errors with reminder itemss \ No newline at end of file diff --git a/README.md b/README.md index 07879ed..6987946 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ #### 安装 ``` dependencies: - wukongimfluttersdk: ^1.1.6 + wukongimfluttersdk: ^1.1.7 ``` #### 引入 ```dart diff --git a/example/pubspec.lock b/example/pubspec.lock index e0d1809..5c9b64f 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -499,7 +499,7 @@ packages: path: ".." relative: true source: path - version: "1.1.6" + version: "1.1.7" x25519: dependency: transitive description: diff --git a/lib/manager/message_manager.dart b/lib/manager/message_manager.dart index a64d175..c31e6b5 100644 --- a/lib/manager/message_manager.dart +++ b/lib/manager/message_manager.dart @@ -67,17 +67,19 @@ class WKMessageManager { content.reply = reply; } var entities = WKDBConst.readString(json, 'entities'); - var jsonArray = jsonDecode(entities); - List list = []; - for (var entityJson in jsonArray) { - WKMsgEntity entity = WKMsgEntity(); - entity.type = WKDBConst.readString(entityJson, 'type'); - entity.offset = WKDBConst.readInt(entityJson, 'offset'); - entity.length = WKDBConst.readInt(entityJson, 'length'); - entity.value = WKDBConst.readString(entityJson, 'value'); - list.add(entity); + if (entities != '') { + var jsonArray = jsonDecode(entities); + List list = []; + for (var entityJson in jsonArray) { + WKMsgEntity entity = WKMsgEntity(); + entity.type = WKDBConst.readString(entityJson, 'type'); + entity.offset = WKDBConst.readInt(entityJson, 'offset'); + entity.length = WKDBConst.readInt(entityJson, 'length'); + entity.value = WKDBConst.readString(entityJson, 'value'); + list.add(entity); + } + content.entities = list; } - content.entities = list; return content; } diff --git a/pubspec.yaml b/pubspec.yaml index 5fff826..88bcaaa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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.1.6 +version: 1.1.7 homepage: https://github.com/WuKongIM/WuKongIMFlutterSDK environment: