3.0-enterprise

hrxiang 2 years ago
parent 3527c80e7b
commit cfc94c06da
  1. 4
      ios/Classes/Module/IMManager.swift
  2. 32
      lib/src/listener/put_file_listener.dart
  3. 2
      lib/src/manager/im_manager.dart

@ -144,7 +144,7 @@ public class UploadFileListener: NSObject, Open_im_sdk_callbackUploadFileCallbac
values["id"] = id values["id"] = id
values["partHash"] = partsHash values["partHash"] = partsHash
values["fileHash"] = fileHash 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?) { 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["index"] = index
values["partSize"] = partSize values["partSize"] = partSize
values["partHash"] = partHash 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)
} }
} }

@ -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);
}
}

@ -560,7 +560,7 @@ class IMManager {
/// ///
Future<UserInfo> getLoginUserInfo() async => userInfo; Future<UserInfo> getLoginUserInfo() async => userInfo;
/// ///[id] [OnUploadFileListener] id一致
Future uploadFile({ Future uploadFile({
required String id, required String id,
required String filePath, required String filePath,

Loading…
Cancel
Save