Skip to content

Commit f7e9315

Browse files
guangyaoguangyao
authored andcommitted
fix
1 parent 5106f10 commit f7e9315

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

ios/RNNeteaseIm/RNNeteaseIm/DWCustomAttachmentDecoder.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#import "DWCustomAttachmentDecoder.h"
1010

11-
1211
@implementation DWCustomAttachmentDecoder
1312

1413
- (id<NIMCustomAttachment>)decodeAttachment:(NSString *)content

ios/RNNeteaseIm/RNNeteaseIm/NIMViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ - (void)onLogin:(NIMLoginStep)step{
8080
default:
8181
break;
8282
}
83-
NSLog(@"--------------------%@",strStatus);
83+
// NSLog(@"--------------------%@",strStatus);
8484
[NIMModel initShareMD].NetStatus = strStatus;
8585
}
8686
//删除一行

ios/RNNeteaseIm/RNNeteaseIm/RNNeteaseIm.m

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@
99
#import "RNNeteaseIm.h"
1010
#import "RCTUtils.h"
1111
#import "RNNotificationCenter.h"
12+
1213
@implementation RNNeteaseIm
1314

15+
- (instancetype)init{
16+
if (self = [super init]) {
17+
18+
}
19+
[self initController];
20+
return self;
21+
}
22+
1423
@synthesize bridge = _bridge;
1524
- (dispatch_queue_t)methodQueue
1625
{
@@ -26,10 +35,6 @@ - (dispatch_queue_t)methodQueue
2635
RCT_EXPORT_METHOD(login:(nonnull NSString *)account token:(nonnull NSString *)token
2736
resolve:(RCTPromiseResolveBlock)resolve
2837
reject:(RCTPromiseRejectBlock)reject){
29-
[self setSendState];
30-
[[NIMViewController initWithController] addDelegate];
31-
[[NoticeViewController initWithNoticeViewController]initWithDelegate];
32-
[[RNNotificationCenter sharedCenter] start];
3338
//请将 NIMMyAccount 以及 NIMMyToken 替换成您自己提交到此App下的账号和密码
3439
[[NIMSDK sharedSDK].loginManager login:account token:token completion:^(NSError *error) {
3540
if (!error) {
@@ -567,6 +572,12 @@ - (void)removAllRecentSessions{
567572

568573
}
569574

575+
- (void)initController{
576+
[self setSendState];
577+
[[NIMViewController initWithController] addDelegate];
578+
[[NoticeViewController initWithNoticeViewController]initWithDelegate];
579+
[[RNNotificationCenter sharedCenter] start];
580+
}
570581

571582
-(void)setSendState{
572583
NIMModel *mod = [NIMModel initShareMD];

0 commit comments

Comments
 (0)