File tree Expand file tree Collapse file tree 3 files changed +23
-20
lines changed
ios/RNNeteaseIm/RNNeteaseIm Expand file tree Collapse file tree 3 files changed +23
-20
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,10 @@ -(void)setNetStatus:(NSString *)NetStatus{
4343 }
4444}
4545-(void )setNIMKick : (NSString *)NIMKick {
46- if ((_NIMKick != NIMKick)&&(NIMKick.length )) {
4746 _NIMKick = NIMKick;
4847 if (self.myBlock ) {
4948 self.myBlock (2 , NIMKick);
5049 }
51- }
5250}
5351// 通信录列表
5452-(void )setContactList : (NSMutableDictionary *)contactList {
Original file line number Diff line number Diff line change 1212typedef void (^SUCCESS) (id param);
1313typedef void (^ERROR)(NSString *error);
1414@interface NIMViewController : UIViewController
15+
1516+(instancetype )initWithController ;
1617-(instancetype )initWithNIMController ;
1718-(void )deleteCurrentSession : (NSString *)recentContactId andback : (ERROR)error ;
Original file line number Diff line number Diff line change 99#import " NIMViewController.h"
1010#import " ContactViewController.h"
1111
12- @interface NIMViewController ()<NIMLoginManagerDelegate,NIMConversationManagerDelegate>
12+ @interface NIMViewController ()<NIMLoginManagerDelegate,NIMConversationManagerDelegate>{
13+
14+ }
1315
1416@end
1517
@@ -102,25 +104,27 @@ -(void)deleteCurrentSession:(NSString *)recentContactId andback:(ERROR)error{
102104#pragma NIMLoginManagerDelegate
103105-(void )onKick : (NIMKickReason)code clientType : (NIMLoginClientType)clientType
104106{
105- switch (code) {
106- case NIMKickReasonByClient:{// 被另外一个客户端踢下线 (互斥客户端一端登录挤掉上一个登录中的客户端)
107- [NIMModel initShareMD ].NIMKick = @" 1" ;
108- }
109- break ;
110- case NIMKickReasonByClientManually:{// 被另外一个客户端手动选择踢下线
111- [NIMModel initShareMD ].NIMKick = @" 3" ;
112- }
113- break ;
114- case NIMKickReasonByServer:{// 你被服务器踢下线
115- [NIMModel initShareMD ].NIMKick = @" 2" ;
107+
108+ switch (code) {
109+ case NIMKickReasonByClient:{// 被另外一个客户端踢下线 (互斥客户端一端登录挤掉上一个登录中的客户端)
110+ [NIMModel initShareMD ].NIMKick = @" 1" ;
111+ }
112+ break ;
113+ case NIMKickReasonByClientManually:{// 被另外一个客户端手动选择踢下线
114+ [NIMModel initShareMD ].NIMKick = @" 3" ;
115+ }
116+ break ;
117+ case NIMKickReasonByServer:{// 你被服务器踢下线
118+ [NIMModel initShareMD ].NIMKick = @" 2" ;
119+ }
120+ break ;
121+ default :
122+ break ;
116123 }
117- break ;
118- default :
119- break ;
120- }
121- [[[NIMSDK sharedSDK ] loginManager ] logout: ^(NSError *error) {
122- }];
124+ [[[NIMSDK sharedSDK ] loginManager ] logout: ^(NSError *error) {
125+ }];
123126}
127+
124128- (void )onAutoLoginFailed : (NSError *)error {
125129
126130 NSLog (@" 自动登录失败" );
You can’t perform that action at this time.
0 commit comments