From 98227756df29b8efaf55f9d64d37cbc45c8999c8 Mon Sep 17 00:00:00 2001 From: Brett <> Date: Mon, 8 Jan 2024 11:39:17 +0800 Subject: [PATCH] chore: https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.1-alpha.2 --- CHANGELOG.md | 4 ++++ ios/Classes/Module/ConversationManager.swift | 4 ++++ ios/Classes/Module/MessageManager.swift | 8 +++++++- ios/flutter_openim_sdk.podspec | 2 +- lib/src/listener/advanced_msg_listener.dart | 6 ++++++ lib/src/manager/im_manager.dart | 15 +++++++++------ lib/src/models/init_config.dart | 4 ---- lib/src/openim.dart | 2 +- pubspec.yaml | 4 ++-- 9 files changed, 34 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d92398..1aac313 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.5.1-alpha.2 + +- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.1-alpha.2) + ## 3.5.0-rc.1 - [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.0-rc.1) diff --git a/ios/Classes/Module/ConversationManager.swift b/ios/Classes/Module/ConversationManager.swift index 59390be..58e022a 100644 --- a/ios/Classes/Module/ConversationManager.swift +++ b/ios/Classes/Module/ConversationManager.swift @@ -161,6 +161,10 @@ public class ConversationListener: NSObject, Open_im_sdk_callbackOnConversationL public func onTotalUnreadMessageCountChanged(_ totalUnreadCount: Int32) { CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onTotalUnreadMessageCountChanged", errCode: nil, errMsg: nil, data: totalUnreadCount) } + + public func onConversationUserInputStatusChanged(_ change: String?) { + CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onConversationUserInputStatusChanged", errCode: nil, errMsg: nil, data: change) + } } diff --git a/ios/Classes/Module/MessageManager.swift b/ios/Classes/Module/MessageManager.swift index 0a5c954..c7ef279 100644 --- a/ios/Classes/Module/MessageManager.swift +++ b/ios/Classes/Module/MessageManager.swift @@ -357,7 +357,13 @@ public class AdvancedMsgListener: NSObject, Open_im_sdk_callbackOnAdvancedMsgLis values["message"] = message CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvOfflineNewMessage", errCode: nil, errMsg: nil, data: values); } - + + public func onRecvOnlineOnlyMessage(_ message: String?) { + var values: [String: Any] = [:] + values["id"] = id + values["message"] = message + CommonUtil.emitEvent(channel: channel, method: "advancedMsgListener", type: "onRecvOnlineOnlyMessage", errCode: nil, errMsg: nil, data: values); + } } public class CustomBusinessListener: NSObject, Open_im_sdk_callbackOnCustomBusinessListenerProtocol { diff --git a/ios/flutter_openim_sdk.podspec b/ios/flutter_openim_sdk.podspec index cc7e03e..fbbbb03 100644 --- a/ios/flutter_openim_sdk.podspec +++ b/ios/flutter_openim_sdk.podspec @@ -17,7 +17,7 @@ A new Flutter project. s.dependency 'Flutter' s.platform = :ios, '11.0' - s.dependency 'OpenIMSDKCore','3.5.0-rc1' + s.dependency 'OpenIMSDKCore','3.5.1-alpha.2' s.static_framework = true # s.vendored_frameworks = 'Framework/*.framework' # Flutter.framework does not contain a i386 slice. diff --git a/lib/src/listener/advanced_msg_listener.dart b/lib/src/listener/advanced_msg_listener.dart index 0d29b41..f9eca83 100644 --- a/lib/src/listener/advanced_msg_listener.dart +++ b/lib/src/listener/advanced_msg_listener.dart @@ -9,6 +9,7 @@ class OnAdvancedMsgListener { Function(String msgID, List list)? onRecvMessageExtensionsDeleted; Function(Message msg)? onRecvNewMessage; Function(Message msg)? onRecvOfflineNewMessage; + Function(Message msg)? onRecvOnlineOnlyMessage; /// Uniquely identifies String id; @@ -21,6 +22,7 @@ class OnAdvancedMsgListener { this.onRecvMessageExtensionsDeleted, this.onRecvNewMessage, this.onRecvOfflineNewMessage, + this.onRecvOnlineOnlyMessage, }) : id = "id_${DateTime.now().microsecondsSinceEpoch}"; void msgDeleted(Message msg) { @@ -56,4 +58,8 @@ class OnAdvancedMsgListener { void recvOfflineNewMessage(Message msg) { onRecvOfflineNewMessage?.call(msg); } + + void recvOnlineOnlyMessage(Message msg) { + onRecvOnlineOnlyMessage?.call(msg); + } } diff --git a/lib/src/manager/im_manager.dart b/lib/src/manager/im_manager.dart index bec77d5..605f838 100644 --- a/lib/src/manager/im_manager.dart +++ b/lib/src/manager/im_manager.dart @@ -160,6 +160,11 @@ class IMManager { final msg = Utils.toObj(value, (map) => Message.fromJson(map)); messageManager.msgListener.recvOfflineNewMessage(msg); break; + case 'onRecvOnlineOnlyMessage': + var value = call.arguments['data']['message']; + final msg = Utils.toObj(value, (map) => Message.fromJson(map)); + messageManager.msgListener.recvOnlineOnlyMessage(msg); + break; } } else if (call.method == ListenerType.msgSendProgressListener) { String type = call.arguments['type']; @@ -279,10 +284,10 @@ class IMManager { String type = call.arguments['type']; dynamic data = call.arguments['data']; switch (type) { - case 'onProgress': - int size = data['size']; - int current = data['current']; - _uploadLogsListener?.onProgress(current, size); + case 'onProgress': + int size = data['size']; + int current = data['current']; + _uploadLogsListener?.onProgress(current, size); } } else if (call.method == ListenerType.uploadFileListener) { String type = call.arguments['type']; @@ -383,7 +388,6 @@ class IMManager { required String dataDir, required OnConnectListener listener, int logLevel = 6, - String objectStorage = 'minio', bool isCompression = false, bool isLogStandardOutput = true, String? logFilePath, @@ -399,7 +403,6 @@ class IMManager { "wsAddr": wsAddr, "dataDir": dataDir, "logLevel": logLevel, - "objectStorage": objectStorage, "isCompression": isCompression, "isLogStandardOutput": isLogStandardOutput, "logFilePath": logFilePath, diff --git a/lib/src/models/init_config.dart b/lib/src/models/init_config.dart index a49ee18..33c8a3b 100644 --- a/lib/src/models/init_config.dart +++ b/lib/src/models/init_config.dart @@ -3,7 +3,6 @@ class InitConfig { String apiAddr; String wsAddr; String dataDir; - String objectStorage; int logLevel; bool isLogStandardOutput; String? logFilePath; @@ -13,7 +12,6 @@ class InitConfig { required this.apiAddr, required this.wsAddr, required this.dataDir, - required this.objectStorage, this.logLevel = 6, this.isLogStandardOutput = true, this.logFilePath, @@ -25,7 +23,6 @@ class InitConfig { apiAddr: json['apiAddr'], wsAddr: json['wsAddr'], dataDir: json['dataDir'], - objectStorage: json['objectStorage'], logLevel: json['logLevel'], isLogStandardOutput: json['isLogStandardOutput'], logFilePath: json['logFilePath'], @@ -38,7 +35,6 @@ class InitConfig { 'apiAddr': apiAddr, 'wsAddr': wsAddr, 'dataDir': dataDir, - 'objectStorage': objectStorage, 'logLevel': logLevel, 'isLogStandardOutput': isLogStandardOutput, 'logFilePath': logFilePath, diff --git a/lib/src/openim.dart b/lib/src/openim.dart index 38790e0..ccd8841 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.5.0-rc.1'; + static const version = '3.5.1-alpha.2'; static const _channel = const MethodChannel('flutter_openim_sdk'); diff --git a/pubspec.yaml b/pubspec.yaml index 42dc8c5..9a4dddb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,11 @@ 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.5.0-rc.1+1 +version: 3.5.1-alpha.2 homepage: https://www.openim.io repository: https://github.com/openimsdk/open-im-sdk-flutter environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.12.0 <4.0.0" flutter: ">=1.20.0" dependencies: