From cfc94c06da4522365399d13e11e85f1dec007d56 Mon Sep 17 00:00:00 2001 From: hrxiang Date: Thu, 13 Jul 2023 18:28:02 +0800 Subject: [PATCH] 3.0-enterprise --- ios/Classes/Module/IMManager.swift | 4 ++-- lib/src/listener/put_file_listener.dart | 32 ------------------------- lib/src/manager/im_manager.dart | 2 +- 3 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 lib/src/listener/put_file_listener.dart diff --git a/ios/Classes/Module/IMManager.swift b/ios/Classes/Module/IMManager.swift index 9ce12b1..c7cb904 100644 --- a/ios/Classes/Module/IMManager.swift +++ b/ios/Classes/Module/IMManager.swift @@ -144,7 +144,7 @@ public class UploadFileListener: NSObject, Open_im_sdk_callbackUploadFileCallbac values["id"] = id values["partHash"] = partsHash values["fileHash"] = fileHash - CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "hashPartComplete", errCode: nil, errMsg: nil, data: values);<#code#> + CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "hashPartComplete", errCode: nil, errMsg: nil, data: values) } public func hashPartProgress(_ index: Int32, size: Int64, partHash: String?) { @@ -193,6 +193,6 @@ public class UploadFileListener: NSObject, Open_im_sdk_callbackUploadFileCallbac values["index"] = index values["partSize"] = partSize values["partHash"] = partHash - CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "uploadPartComplete", errCode: nil, errMsg: nil, data: values);<#code#> + CommonUtil.emitEvent(channel: channel, method: "uploadFileListener", type: "uploadPartComplete", errCode: nil, errMsg: nil, data: values) } } diff --git a/lib/src/listener/put_file_listener.dart b/lib/src/listener/put_file_listener.dart deleted file mode 100644 index 63ee26c..0000000 --- a/lib/src/listener/put_file_listener.dart +++ /dev/null @@ -1,32 +0,0 @@ -class OnPutFileListener { - Function(String putID, String hash, int total)? onHashComplete; - Function(String putID, int current, int total)? onHashProgress; - Function(String putID, int size)? onOpen; - Function(String putID, int total, int putType)? onPutComplete; - Function(String putID, int save, int current, int total)? onPutProgress; - Function(String putID, int current, int total)? onPutStart; - - void hashComplete(String putID, String hash, int total) { - onHashComplete?.call(putID, hash, total); - } - - void hashProgress(String putID, int current, int total) { - onHashProgress?.call(putID, current, total); - } - - void open(String putID, int size) { - onOpen?.call(putID, size); - } - - void putComplete(String putID, int total, int putType) { - onPutComplete?.call(putID, total, putType); - } - - void putProgress(String putID, int save, int current, int total) { - onPutProgress?.call(putID, save, current, total); - } - - void putStart(String putID, int current, int total) { - onPutStart?.call(putID, current, total); - } -} diff --git a/lib/src/manager/im_manager.dart b/lib/src/manager/im_manager.dart index 7745c5f..b53ed70 100644 --- a/lib/src/manager/im_manager.dart +++ b/lib/src/manager/im_manager.dart @@ -560,7 +560,7 @@ class IMManager { /// 获取当前登录用户信息 Future getLoginUserInfo() async => userInfo; - /// + ///[id] 跟 [OnUploadFileListener] id一致,区分是哪个文件的回调 Future uploadFile({ required String id, required String filePath,