|
|
@ -21,14 +21,17 @@ public class ConversationManager: BaseServiceManager { |
|
|
|
self["setConversationPrivateChat"] = setConversationPrivateChat |
|
|
|
self["setConversationPrivateChat"] = setConversationPrivateChat |
|
|
|
self["clearConversationAndDeleteAllMsg"] = clearConversationAndDeleteAllMsg |
|
|
|
self["clearConversationAndDeleteAllMsg"] = clearConversationAndDeleteAllMsg |
|
|
|
self["deleteConversationAndDeleteAllMsg"] = deleteConversationAndDeleteAllMsg |
|
|
|
self["deleteConversationAndDeleteAllMsg"] = deleteConversationAndDeleteAllMsg |
|
|
|
self["deleteAllConversationFromLocal"] = deleteAllConversationFromLocal |
|
|
|
|
|
|
|
self["resetConversationGroupAtType"] = resetConversationGroupAtType |
|
|
|
self["resetConversationGroupAtType"] = resetConversationGroupAtType |
|
|
|
self["getAtAllTag"] = getAtAllTag |
|
|
|
self["getAtAllTag"] = getAtAllTag |
|
|
|
self["setGlobalRecvMessageOpt"] = setGlobalRecvMessageOpt |
|
|
|
self["setGlobalRecvMessageOpt"] = setGlobalRecvMessageOpt |
|
|
|
self["setConversationBurnDuration"] = setConversationBurnDuration |
|
|
|
self["setConversationBurnDuration"] = setConversationBurnDuration |
|
|
|
|
|
|
|
self["setConversationIsMsgDestruct"] = setConversationIsMsgDestruct |
|
|
|
|
|
|
|
self["setConversationMsgDestructTime"] = setConversationMsgDestructTime |
|
|
|
self["hideAllConversations"] = hideAllConversations |
|
|
|
self["hideAllConversations"] = hideAllConversations |
|
|
|
self["searchConversation"] = searchConversation |
|
|
|
self["searchConversation"] = searchConversation |
|
|
|
self["setConversationEx"] = setConversationEx |
|
|
|
self["setConversationEx"] = setConversationEx |
|
|
|
|
|
|
|
self["changeInputStates"] = changeInputStates |
|
|
|
|
|
|
|
self["getInputStates"] = getInputStates |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
|
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
@ -116,8 +119,16 @@ public class ConversationManager: BaseServiceManager { |
|
|
|
Open_im_sdkSetConversationBurnDuration(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[int32: "burnDuration"]) |
|
|
|
Open_im_sdkSetConversationBurnDuration(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[int32: "burnDuration"]) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func setConversationIsMsgDestruct(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
|
|
|
|
|
Open_im_sdkSetConversationIsMsgDestruct(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[bool: "isMsgDestruct"]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func setConversationMsgDestructTime(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
|
|
|
|
|
Open_im_sdkSetConversationMsgDestructTime(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[int64: "duration"]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func hideAllConversations(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
|
func hideAllConversations(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
|
Open_im_sdkHideAllConversations(BaseCallback(result: result), methodCall[string: "operationID"]) |
|
|
|
Open_im_sdkHideAllConversations(BaseCallback(result: result), methodCall[string: "operationID"]) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func searchConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
|
func searchConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
@ -125,7 +136,15 @@ public class ConversationManager: BaseServiceManager { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func setConversationEx(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
|
func setConversationEx(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
|
Open_im_sdkSetConversationEx(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[jsonString: "ex"]) |
|
|
|
Open_im_sdkSetConversationEx(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[string: "ex"]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func changeInputStates(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
|
|
|
|
|
Open_im_sdkChangeInputStates(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[bool: "focus"]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func getInputStates(methodCall: FlutterMethodCall, result: @escaping FlutterResult){ |
|
|
|
|
|
|
|
Open_im_sdkGetInputStates(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[string: "userID"]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -135,30 +154,30 @@ public class ConversationListener: NSObject, Open_im_sdk_callbackOnConversationL |
|
|
|
public func onSyncServerProgress(_ progress: Int) { |
|
|
|
public func onSyncServerProgress(_ progress: Int) { |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerProgress", errCode: nil, errMsg: nil, data: progress) |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerProgress", errCode: nil, errMsg: nil, data: progress) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private let channel:FlutterMethodChannel |
|
|
|
private let channel:FlutterMethodChannel |
|
|
|
|
|
|
|
|
|
|
|
init(channel:FlutterMethodChannel) { |
|
|
|
init(channel:FlutterMethodChannel) { |
|
|
|
self.channel = channel |
|
|
|
self.channel = channel |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public func onConversationChanged(_ conversationList: String?) { |
|
|
|
public func onConversationChanged(_ conversationList: String?) { |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onConversationChanged", errCode: nil, errMsg: nil, data: conversationList) |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onConversationChanged", errCode: nil, errMsg: nil, data: conversationList) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public func onNewConversation(_ conversationList: String?) { |
|
|
|
public func onNewConversation(_ conversationList: String?) { |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onNewConversation", errCode: nil, errMsg: nil, data: conversationList) |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onNewConversation", errCode: nil, errMsg: nil, data: conversationList) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public func onSyncServerFailed(_ reinstalled: Bool) { |
|
|
|
public func onSyncServerFailed(_ reinstalled: Bool) { |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerFailed", errCode: nil, errMsg: nil, data: reinstalled) |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerFailed", errCode: nil, errMsg: nil, data: reinstalled) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public func onSyncServerFinish(_ reinstalled: Bool) { |
|
|
|
public func onSyncServerFinish(_ reinstalled: Bool) { |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerFinish", errCode: nil, errMsg: nil, data: reinstalled) |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerFinish", errCode: nil, errMsg: nil, data: reinstalled) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public func onSyncServerStart(_ reinstalled: Bool) { |
|
|
|
public func onSyncServerStart(_ reinstalled: Bool) { |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerStart", errCode: nil, errMsg: nil, data: reinstalled) |
|
|
|
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerStart", errCode: nil, errMsg: nil, data: reinstalled) |
|
|
|
} |
|
|
|
} |
|
|
|