@@ -443,7 +443,7 @@ - (void)callStateWillChangeTo:(EaseCallState)newState from:(EaseCallState)preSta
443443- (void )messagesDidReceive : (NSArray *)aMessages
444444{
445445 __weak typeof (self) weakself = self;
446- dispatch_async (weakself. workQueue , ^{
446+ dispatch_async (dispatch_get_main_queue () , ^{
447447 for (EMChatMessage *msg in aMessages) {
448448 [weakself _parseMsg: msg];
449449 }
@@ -453,7 +453,7 @@ - (void)messagesDidReceive:(NSArray *)aMessages
453453- (void )cmdMessagesDidReceive : (NSArray *)aCmdMessages
454454{
455455 __weak typeof (self) weakself = self;
456- dispatch_async (weakself. workQueue , ^{
456+ dispatch_async (dispatch_get_main_queue () , ^{
457457 for (EMChatMessage *msg in aCmdMessages) {
458458 [weakself _parseMsg: msg];
459459 }
@@ -684,10 +684,8 @@ - (void)_parseMsg:(EMChatMessage*)aMsg
684684 // [[EMClient sharedClient] log:[NSString stringWithFormat:@"parseAnswerMsgExt currentCallId:%@,state:%ld",weakself.modal.currentCall.callId,weakself.modal.state]];
685685 if (weakself.modal .currentCall && [weakself.modal.currentCall.callId isEqualToString: callId] && [weakself.modal.curDevId isEqualToString: callerDevId]) {
686686 if (weakself.modal .currentCall .callType == EaseCallTypeMulti) {
687- dispatch_async (dispatch_get_main_queue (), ^{
688- if (![result isEqualToString: kAcceptResult ])
689- [[weakself getMultiVC ] removePlaceHolderForMember: from];
690- });
687+ if (![result isEqualToString: kAcceptResult ])
688+ [[weakself getMultiVC ] removePlaceHolderForMember: from];
691689
692690 NSTimer * timer = [self .callTimerDic objectForKey: from];
693691 if (timer) {
@@ -701,9 +699,7 @@ - (void)_parseMsg:(EMChatMessage*)aMsg
701699 if ([result isEqualToString: kAcceptResult ]) {
702700
703701 if (isVideoToVoice && isVideoToVoice.boolValue ) {
704- dispatch_async (dispatch_get_main_queue (), ^{
705702 [weakself switchToVoice ];
706- });
707703 }
708704 weakself.modal .state = EaseCallState_Answering;
709705 }else
@@ -752,12 +748,9 @@ - (void)_parseMsg:(EMChatMessage*)aMsg
752748 // 仲裁为自己
753749 if ([result isEqualToString: kAcceptResult ]) {
754750 weakself.modal .state = EaseCallState_Answering;
755- dispatch_async (dispatch_get_main_queue (), ^{
756-
757- if (weakself.modal .currentCall .callType != EaseCallType1v1Audio)
758- [weakself setupLocalVideo ];
759- [weakself fetchToken ];
760- });
751+ if (weakself.modal .currentCall .callType != EaseCallType1v1Audio)
752+ [weakself setupLocalVideo ];
753+ [weakself fetchToken ];
761754 }
762755 }else {
763756 // 已在其他端处理
@@ -774,10 +767,7 @@ - (void)_parseMsg:(EMChatMessage*)aMsg
774767 };
775768 void (^parseVideoToVoiceMsg)(NSDictionary *) = ^void (NSDictionary * ext){
776769 if (weakself.modal .currentCall && [weakself.modal.currentCall.callId isEqualToString: callId]) {
777- dispatch_async (dispatch_get_main_queue (), ^{
778- [weakself switchToVoice ];
779- });
780-
770+ [weakself switchToVoice ];
781771 }
782772 };
783773 if ([msgType isEqualToString: kMsgTypeValue ]) {
0 commit comments