diff --git a/CHANGELOG.md b/CHANGELOG.md index 829beed..9a341ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.8.3+hotfix.12 + +- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.12) + ## 3.8.3+hotfix.10.1 - [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.10) diff --git a/android/build.gradle b/android/build.gradle index 1197098..b1b0183 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -36,7 +36,7 @@ android { } dependencies { - implementation 'io.openim:core-sdk:3.8.3-patch10@aar' + implementation 'io.openim:core-sdk:3.8.3-patch12@aar' testImplementation("junit:junit:4.13.2") testImplementation("org.mockito:mockito-core:5.0.0") } diff --git a/android/settings.gradle b/android/settings.gradle index dc38937..fb01670 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1 +1,2 @@ rootProject.name = 'flutter_openim_sdk' + \ No newline at end of file diff --git a/android/src/main/java/io/openim/flutter_openim_sdk/listener/OnUserListener.java b/android/src/main/java/io/openim/flutter_openim_sdk/listener/OnUserListener.java index f724d8c..a2977b7 100644 --- a/android/src/main/java/io/openim/flutter_openim_sdk/listener/OnUserListener.java +++ b/android/src/main/java/io/openim/flutter_openim_sdk/listener/OnUserListener.java @@ -13,19 +13,4 @@ public class OnUserListener implements open_im_sdk_callback.OnUserListener { public void onUserStatusChanged(String s) { CommonUtil.emitEvent("userListener", "onUserStatusChanged", s); } - - @Override - public void onUserCommandAdd(String s) { - CommonUtil.emitEvent("userListener", "onUserCommandAdd", s); - } - - @Override - public void onUserCommandDelete(String s) { - CommonUtil.emitEvent("userListener", "onUserCommandDelete", s); - } - - @Override - public void onUserCommandUpdate(String s) { - CommonUtil.emitEvent("userListener", "onUserCommandUpdate", s); - } } diff --git a/example/android/build/reports/problems/problems-report.html b/example/android/build/reports/problems/problems-report.html index 9da070b..e86a0f1 100644 --- a/example/android/build/reports/problems/problems-report.html +++ b/example/android/build/reports/problems/problems-report.html @@ -650,7 +650,7 @@ code + .copy-button { diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 7eb6643..9dbfda0 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -2,8 +2,8 @@ PODS: - Flutter (1.0.0) - flutter_openim_sdk (0.0.1): - Flutter - - OpenIMSDKCore (= 3.8.3-hotfix.10) - - OpenIMSDKCore (3.8.3-hotfix.10) + - OpenIMSDKCore (= 3.8.3-hotfix.12) + - OpenIMSDKCore (3.8.3-hotfix.12) DEPENDENCIES: - Flutter (from `Flutter`) @@ -21,9 +21,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - flutter_openim_sdk: 59aa0c08eb7499a1790168e10539e4dd915ced6e - OpenIMSDKCore: bc9a6e5de2aabed76e4f69fe06a7c9df1d945afc + flutter_openim_sdk: bb2a5af4aeda4b44362ca6c223c1515e2fee795d + OpenIMSDKCore: 02383b2a3f989a1fff29ad5f83c1dac1ee5bfb36 -PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 +PODFILE CHECKSUM: 7be2f5f74864d463a8ad433546ed1de7e0f29aef COCOAPODS: 1.16.2 diff --git a/example/pubspec.lock b/example/pubspec.lock index 9f0b254..58917a6 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -76,7 +76,7 @@ packages: path: ".." relative: true source: path - version: "3.8.3+hotfix.10" + version: "3.8.3+hotfix.10.1" flutter_test: dependency: "direct dev" description: flutter diff --git a/ios/flutter_openim_sdk.podspec b/ios/flutter_openim_sdk.podspec index c869fff..012a723 100644 --- a/ios/flutter_openim_sdk.podspec +++ b/ios/flutter_openim_sdk.podspec @@ -17,13 +17,13 @@ A new Flutter project. s.dependency 'Flutter' s.platform = :ios, '11.0' - s.dependency 'OpenIMSDKCore','3.8.3-hotfix.10' + s.dependency 'OpenIMSDKCore','3.8.3-hotfix.12' s.static_framework = true s.library = 'resolv' # s.vendored_frameworks = 'Framework/*.xcframework' # Flutter.framework does not contain a i386 slice. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 arm64' } + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } s.swift_version = '5.0' s.resource_bundles = {'flutter_openim_sdk_privacy' => ['Resources/PrivacyInfo.xcprivacy']} diff --git a/lib/src/models/group_info.dart b/lib/src/models/group_info.dart index ccb91b8..b8e8579 100644 --- a/lib/src/models/group_info.dart +++ b/lib/src/models/group_info.dart @@ -429,7 +429,7 @@ class GetGroupApplicationListAsRecipientReq { final int offset; final int count; - GetGroupApplicationListAsRecipientReq({ + GetGroupApplicationListAsRecipientReq({ this.groupIDs = const [], this.handleResults = const [], required this.offset, @@ -466,8 +466,8 @@ class GetGroupApplicationListAsApplicantReq { GetGroupApplicationListAsApplicantReq({ this.groupIDs = const [], this.handleResults = const [], - required this.offset, - required this.count, + this.offset = 0, + this.count = 40, }); GetGroupApplicationListAsApplicantReq.fromJson(Map json) diff --git a/lib/src/models/message.dart b/lib/src/models/message.dart index 592a110..3f9018f 100644 --- a/lib/src/models/message.dart +++ b/lib/src/models/message.dart @@ -257,7 +257,8 @@ class Message { @override bool operator ==(Object other) => - identical(this, other) || other is Message && runtimeType == other.runtimeType && clientMsgID == other.clientMsgID; + identical(this, other) || + other is Message && runtimeType == other.runtimeType && clientMsgID == other.clientMsgID; @override int get hashCode => clientMsgID.hashCode; @@ -787,12 +788,15 @@ class AttachedInfoElem { /// Do not send offline push notifications bool? notSenderNotificationPush; + UploadProgress? uploadProgress; + AttachedInfoElem({ this.groupHasReadInfo, this.isPrivateChat, this.hasReadTime, this.burnDuration, this.notSenderNotificationPush, + this.uploadProgress, }); AttachedInfoElem.fromJson(Map json) { @@ -801,6 +805,7 @@ class AttachedInfoElem { hasReadTime = json['hasReadTime']; burnDuration = json['burnDuration']; notSenderNotificationPush = json['notSenderNotificationPush']; + uploadProgress = json['uploadProgress'] == null ? null : UploadProgress.fromJson(json['uploadProgress']); } Map toJson() { @@ -810,6 +815,33 @@ class AttachedInfoElem { data['hasReadTime'] = this.hasReadTime; data['burnDuration'] = this.burnDuration; data['notSenderNotificationPush'] = this.notSenderNotificationPush; + data['uploadProgress'] = uploadProgress?.toJson(); + + return data; + } +} + +class UploadProgress { + int? total; + int? save; + int? current; + String? uploadID; + + UploadProgress({this.total, this.save, this.current, this.uploadID}); + + UploadProgress.fromJson(Map json) { + total = json['total'] ?? 0; + save = json['save'] ?? 0; + current = json['current'] ?? 0; + uploadID = json['uploadID'] ?? ''; + } + + Map toJson() { + final data = {}; + data['total'] = total; + data['save'] = save; + data['current'] = current; + data['uploadID'] = uploadID; return data; } } @@ -879,7 +911,9 @@ class AdvancedTextElem { AdvancedTextElem.fromJson(Map json) { text = json['text']; - messageEntityList = json['messageEntityList'] == null ? null : (json['messageEntityList'] as List).map((e) => MessageEntity.fromJson(e)).toList(); + messageEntityList = json['messageEntityList'] == null + ? null + : (json['messageEntityList'] as List).map((e) => MessageEntity.fromJson(e)).toList(); } Map toJson() { @@ -961,7 +995,8 @@ class ReadReceiptInfo { /// Conversation type [ConversationType] int? sessionType; - ReadReceiptInfo({this.userID, this.groupID, this.msgIDList, this.readTime, this.msgFrom, this.contentType, this.sessionType}); + ReadReceiptInfo( + {this.userID, this.groupID, this.msgIDList, this.readTime, this.msgFrom, this.contentType, this.sessionType}); ReadReceiptInfo.fromJson(Map json) { userID = json['uid'] ?? json['userID']; @@ -1132,7 +1167,8 @@ class AdvancedMessage { }); AdvancedMessage.fromJson(Map json) { - messageList = json['messageList'] == null ? null : (json['messageList'] as List).map((e) => Message.fromJson(e)).toList(); + messageList = + json['messageList'] == null ? null : (json['messageList'] as List).map((e) => Message.fromJson(e)).toList(); isEnd = json['isEnd']; errCode = json['errCode']; errMsg = json['errMsg']; diff --git a/lib/src/openim.dart b/lib/src/openim.dart index 82d932d..c8d8f3f 100644 --- a/lib/src/openim.dart +++ b/lib/src/openim.dart @@ -2,7 +2,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_openim_sdk/flutter_openim_sdk.dart'; class OpenIM { - static const version = '3.8.3+hotfix.10.1'; + static const version = '3.8.3+hotfix.12'; static const _channel = MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index b7fd63e..8ca2d22 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_openim_sdk description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source. -version: 3.8.3+hotfix.10.1 +version: 3.8.3+hotfix.12 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter