Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b577ec8b8 | ||
|
|
bd76c29f15 |
@@ -389,12 +389,12 @@ public class MessageManager extends BaseManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void FetchSurroundingMessages(MethodCall methodCall, MethodChannel.Result result) {
|
public void FetchSurroundingMessages(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result,
|
Open_im_sdk.fetchSurroundingMessages(
|
||||||
Open_im_sdk.createFileMessageByURL(
|
new OnBaseListener(result, methodCall),
|
||||||
value(methodCall, "operationID"),
|
value(methodCall, "operationID"),
|
||||||
jsonValue(methodCall, "message"),
|
jsonValue(methodCall, "message"),
|
||||||
int2long(methodCall, "before"),
|
int2long(methodCall, "before"),
|
||||||
int2long(methodCall, "after")));
|
int2long(methodCall, "after"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ public class MessageManager: BaseServiceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func fetchSurroundingMessages(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func fetchSurroundingMessages(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkFetchSurroundingMessages(methodCall[string: "operationID"], methodCall[jsonString: "message"], methodCall[int: "before"], methodCall[int: "after"]))
|
Open_im_sdkFetchSurroundingMessages(BaseCallback(result: result),methodCall[string: "operationID"], methodCall[jsonString: "message"], methodCall[int: "before"], methodCall[int: "after"])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -836,10 +836,7 @@ class MessageManager {
|
|||||||
'after': after ?? 0,
|
'after': after ?? 0,
|
||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}))
|
}))
|
||||||
.then((value) {
|
.then((value) => Utils.toList(value, (map) => Message.fromJson(map)));
|
||||||
final result = Utils.toListMap(value);
|
|
||||||
return List<Message>.from(result);
|
|
||||||
});
|
|
||||||
|
|
||||||
static Map _buildParam(Map<String, dynamic> param) {
|
static Map _buildParam(Map<String, dynamic> param) {
|
||||||
param["ManagerName"] = "messageManager";
|
param["ManagerName"] = "messageManager";
|
||||||
|
|||||||
Reference in New Issue
Block a user