@@ -219,20 +219,30 @@ - (dispatch_queue_t)methodQueue
219219}
220220// 开启/关闭群组消息提醒
221221RCT_EXPORT_METHOD (setTeamNotify:(nonnull NSString *)teamId needNotify:(nonnull NSString *)needNotify resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject){
222+ __weak typeof (self)weakSelf = self;
222223 [[TeamViewController initWithTeamViewController ]muteTeam:teamId mute: needNotify Succ: ^(id param) {
223224 resolve (param);
225+ [weakSelf updateMessageList ];
224226 } Err: ^(id erro) {
225227 reject (@" -1" ,erro,nil );
226228 }];
227229}
228230// 好友消息提醒开关
229231RCT_EXPORT_METHOD (setMessageNotify:(nonnull NSString *)contactId needNotify:(nonnull NSString *)needNotify resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject){
232+ __weak typeof (self)weakSelf = self;
230233 [[ConversationViewController initWithConversationViewController ]muteMessage:contactId mute: needNotify Succ: ^(id param) {
231234 resolve (param);
235+ [weakSelf updateMessageList ];
232236 } Err: ^(id erro) {
233237 reject (@" -1" ,erro,nil );
234238 }];
235239}
240+ // 刷新最近会话列表
241+ - (void )updateMessageList {
242+ [[NIMViewController initWithController ]getResouces];
243+ NSLog (@" ---updateMessageList" );
244+ }
245+
236246// 解散群
237247RCT_EXPORT_METHOD (dismissTeam:(nonnull NSString *)teamId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject){
238248 [[TeamViewController initWithTeamViewController ] dismissTeam: teamId Succ: ^(id param) {
@@ -398,7 +408,7 @@ - (dispatch_queue_t)methodQueue
398408 [[ConversationViewController initWithConversationViewController ]play:filepath];
399409}
400410// 播放本地资源录音
401- RCT_EXPORT_METHOD (playLocacl :(nonnull NSString *)name type:(nonnull NSString *)type){
411+ RCT_EXPORT_METHOD (playLocal :(nonnull NSString *)name type:(nonnull NSString *)type){
402412 NSString *path = [[NSBundle mainBundle ] pathForResource: name ofType: type];
403413 [[ConversationViewController initWithConversationViewController ]play:path];
404414}
@@ -479,8 +489,7 @@ - (dispatch_queue_t)methodQueue
479489
480490 NSString *allSize = [NSString stringWithFormat: @" %f " ,docSize+libSize+tmpNimSize+tmpPickSize];
481491 NSLog (@" allSize:%@ documentPath:%@ " ,allSize,documentPath);
482- NSArray *events = @[allSize];
483- resolve (events);
492+ resolve (allSize);
484493}
485494
486495// 清除数据缓存
0 commit comments