Skip to content

Commit

Permalink
Merge pull request #548 from easemob/dev_4.0.0+7
Browse files Browse the repository at this point in the history
Dev 4.0.0+7
  • Loading branch information
dujiepeng committed May 22, 2023
2 parents 6099482 + 37eaee9 commit 855ff0e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
## NEXT

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

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

## 4.0.0+5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

public class EMClientWrapper extends EMWrapper implements MethodCallHandler {

private EMOptions options;
static EMClientWrapper wrapper;
private EMChatManagerWrapper chatManagerWrapper;
private EMGroupManagerWrapper groupManagerWrapper;
Expand Down Expand Up @@ -280,8 +279,7 @@ private void kickAllDevices(JSONObject param, String channelName, Result result)
}

private void init(JSONObject param, String channelName, Result result) throws JSONException {
if(options != null) return;
options = EMOptionsHelper.fromJson(param, this.context);
EMOptions options = EMOptionsHelper.fromJson(param, this.context);
EMClient.getInstance().init(this.context, options);
EMClient.getInstance().setDebugMode(param.getBoolean("debugModel"));

Expand Down
9 changes: 3 additions & 6 deletions ios/Classes/EMClientWrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ @interface EMClientWrapper () <EMClientDelegate, EMMultiDevicesDelegate, Flutter
@end

@implementation EMClientWrapper
{
EMOptions *_options;
}


static EMClientWrapper *wrapper = nil;

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

if(_options != nil) return;
__weak typeof(self) weakSelf = self;

_options = [EMOptions fromJson:param];
EMOptions *options = [EMOptions fromJson:param];

[EMClient.sharedClient initializeSDKWithOptions:_options];
[EMClient.sharedClient initializeSDKWithOptions:options];

[EMClient.sharedClient addDelegate:self delegateQueue:nil];
[EMClient.sharedClient addMultiDevicesDelegate:self delegateQueue:nil];
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: im_flutter_sdk
description: Integrate the Chat SDK to enjoy the global IM services with high reliability, ultra-low latency, and high concurrency.
version: 4.0.0+6
version: 4.0.0+7
homepage: https://www.easemob.com/product/im

environment:
Expand Down

0 comments on commit 855ff0e

Please sign in to comment.