diff --git a/Linphone/UI/Call/CallView.swift b/Linphone/UI/Call/CallView.swift index 78c1cab1b..16dd3f410 100644 --- a/Linphone/UI/Call/CallView.swift +++ b/Linphone/UI/Call/CallView.swift @@ -843,6 +843,26 @@ struct CallView: View { } Spacer() } + } else if callViewModel.activeSpeakerParticipant!.isJoining { + VStack { + VStack { + Spacer() + + ActivityIndicator(color: .white) + .frame(width: 40, height: 40) + .padding(.bottom, 5) + + Text("conference_participant_joining_text") + .frame(maxWidth: .infinity, alignment: .center) + .foregroundStyle(Color.white) + .default_text_style_500(styleSize: 14) + .lineLimit(1) + .padding(.horizontal, 10) + + Spacer() + } + Spacer() + } } else { VStack { Spacer() diff --git a/Linphone/UI/Call/ViewModel/CallViewModel.swift b/Linphone/UI/Call/ViewModel/CallViewModel.swift index 4ef3d3c9e..a119a403f 100644 --- a/Linphone/UI/Call/ViewModel/CallViewModel.swift +++ b/Linphone/UI/Call/ViewModel/CallViewModel.swift @@ -338,21 +338,21 @@ class CallViewModel: ObservableObject { if conf.activeSpeakerParticipantDevice?.address != nil { activeSpeakerParticipantTmp = ParticipantModel( address: conf.activeSpeakerParticipantDevice!.address!, - isJoining: false, + isJoining: conf.activeSpeakerParticipantDevice!.state == .Joining || conf.activeSpeakerParticipantDevice!.state == .Alerting, onPause: conf.activeSpeakerParticipantDevice!.state == .OnHold, isMuted: conf.activeSpeakerParticipantDevice!.isMuted ) } else if conf.participantList.first?.address != nil && conf.participantList.first!.address!.clone()!.equal(address2: (conf.me?.address)!) { activeSpeakerParticipantTmp = ParticipantModel( address: conf.participantDeviceList.first!.address!, - isJoining: false, + isJoining: conf.participantDeviceList.first!.state == .Joining || conf.participantDeviceList.first!.state == .Alerting, onPause: conf.participantDeviceList.first!.state == .OnHold, isMuted: conf.participantDeviceList.first!.isMuted ) } else if conf.participantList.last?.address != nil { activeSpeakerParticipantTmp = ParticipantModel( address: conf.participantDeviceList.last!.address!, - isJoining: false, + isJoining: conf.participantDeviceList.last!.state == .Joining || conf.participantDeviceList.last!.state == .Alerting, onPause: conf.participantDeviceList.last!.state == .OnHold, isMuted: conf.participantDeviceList.last!.isMuted ) @@ -457,21 +457,21 @@ class CallViewModel: ObservableObject { if conference.activeSpeakerParticipantDevice?.address != nil { activeSpeakerParticipantTmp = ParticipantModel( address: conference.activeSpeakerParticipantDevice!.address!, - isJoining: false, + isJoining: conference.activeSpeakerParticipantDevice!.state == .Joining || conference.activeSpeakerParticipantDevice!.state == .Alerting, onPause: conference.activeSpeakerParticipantDevice!.state == .OnHold, isMuted: conference.activeSpeakerParticipantDevice!.isMuted ) } else if conference.participantList.first?.address != nil && conference.participantList.first!.address!.clone()!.equal(address2: (conference.me?.address)!) { activeSpeakerParticipantTmp = ParticipantModel( address: conference.participantDeviceList.first!.address!, - isJoining: false, + isJoining: conference.participantDeviceList.first!.state == .Joining || conference.participantDeviceList.first!.state == .Alerting, onPause: conference.participantDeviceList.first!.state == .OnHold, isMuted: conference.participantDeviceList.first!.isMuted ) } else if conference.participantList.last?.address != nil { activeSpeakerParticipantTmp = ParticipantModel( address: conference.participantDeviceList.last!.address!, - isJoining: false, + isJoining: conference.participantDeviceList.last!.state == .Joining || conference.participantDeviceList.last!.state == .Alerting, onPause: conference.participantDeviceList.last!.state == .OnHold, isMuted: conference.participantDeviceList.last!.isMuted ) @@ -601,7 +601,7 @@ class CallViewModel: ObservableObject { let activeSpeakerParticipantTmp = ParticipantModel( address: participantDevice!.address!, - isJoining: false, + isJoining: participantDevice!.state == .Joining || participantDevice!.state == .Alerting, onPause: participantDevice!.state == .OnHold, isMuted: participantDevice!.isMuted )