Skip to content

Commit 855ff0e

Browse files
authored
Merge pull request #548 from easemob/dev_4.0.0+7
Dev 4.0.0+7
2 parents 6099482 + 37eaee9 commit 855ff0e

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
## NEXT
22

3-
## 4.0.0+6
3+
## 4.0.0+7
4+
- 修复初始化问题。
45

5-
- 修复 Hot reload 后回调执行多次的问题。
6+
## 4.0.0+6
7+
- 修复下载附件结束后状态不准确的问题。
68

79
## 4.0.0+5
810

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
public class EMClientWrapper extends EMWrapper implements MethodCallHandler {
3232

33-
private EMOptions options;
3433
static EMClientWrapper wrapper;
3534
private EMChatManagerWrapper chatManagerWrapper;
3635
private EMGroupManagerWrapper groupManagerWrapper;
@@ -280,8 +279,7 @@ private void kickAllDevices(JSONObject param, String channelName, Result result)
280279
}
281280

282281
private void init(JSONObject param, String channelName, Result result) throws JSONException {
283-
if(options != null) return;
284-
options = EMOptionsHelper.fromJson(param, this.context);
282+
EMOptions options = EMOptionsHelper.fromJson(param, this.context);
285283
EMClient.getInstance().init(this.context, options);
286284
EMClient.getInstance().setDebugMode(param.getBoolean("debugModel"));
287285

ios/Classes/EMClientWrapper.m

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ @interface EMClientWrapper () <EMClientDelegate, EMMultiDevicesDelegate, Flutter
3939
@end
4040

4141
@implementation EMClientWrapper
42-
{
43-
EMOptions *_options;
44-
}
42+
4543

4644
static EMClientWrapper *wrapper = nil;
4745

@@ -186,12 +184,11 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
186184
#pragma mark - Actions
187185
- (void)initSDKWithDict:(NSDictionary *)param channelName:(NSString *)aChannelName result:(FlutterResult)result {
188186

189-
if(_options != nil) return;
190187
__weak typeof(self) weakSelf = self;
191188

192-
_options = [EMOptions fromJson:param];
189+
EMOptions *options = [EMOptions fromJson:param];
193190

194-
[EMClient.sharedClient initializeSDKWithOptions:_options];
191+
[EMClient.sharedClient initializeSDKWithOptions:options];
195192

196193
[EMClient.sharedClient addDelegate:self delegateQueue:nil];
197194
[EMClient.sharedClient addMultiDevicesDelegate:self delegateQueue:nil];

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: im_flutter_sdk
22
description: Integrate the Chat SDK to enjoy the global IM services with high reliability, ultra-low latency, and high concurrency.
3-
version: 4.0.0+6
3+
version: 4.0.0+7
44
homepage: https://www.easemob.com/product/im
55

66
environment:

0 commit comments

Comments
 (0)