Skip to content

Commit 924075d

Browse files
authored
Merge pull request #472 from dujiepeng/flutter2
修复安卓下resend不回调onError方法
2 parents f8f8c91 + b6a09da commit 924075d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

android/src/main/java/com/easemob/im_flutter_sdk/EMChatManagerWrapper.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,17 @@ public void onProgress(int progress, String status) {
167167
});
168168
}
169169

170+
170171
@Override
171172
public void onError(int code, String desc) {
173+
Map<String, Object> data = new HashMap<>();
174+
data.put("code", code);
175+
data.put("description", desc);
172176
post(() -> {
173177
Map<String, Object> map = new HashMap<>();
174178
map.put("message", EMMessageHelper.toJson(finalMsg));
175179
map.put("localTime", finalMsg.localTime());
176-
map.put("code", code);
177-
map.put("description", desc);
180+
map.put("error", data);
178181
messageChannel.invokeMethod(EMSDKMethod.onMessageError, map);
179182
});
180183
}

example/lib/pages/chat/chat_input_bar.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'package:easeim_flutter_demo/widgets/common_widgets.dart';
2-
import 'package:flutter/gestures.dart';
32
import 'package:flutter/material.dart';
43

54
enum ChatInputBarType {

0 commit comments

Comments
 (0)