Show accurate current group call participants in lobby header.

This commit is contained in:
Cody Henthorne 2020-12-09 11:53:59 -05:00 committed by GitHub
parent 974c33fe37
commit 5d4922ed8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -264,8 +264,10 @@ public class WebRtcCallView extends FrameLayout {
pages.add(WebRtcCallParticipantsPage.forSingleParticipant(state.getFocusedParticipant(), state.isInPipMode())); pages.add(WebRtcCallParticipantsPage.forSingleParticipant(state.getFocusedParticipant(), state.isInPipMode()));
} }
if (state.getGroupCallState().isConnected()) { if ((state.getGroupCallState().isNotIdle() && state.getRemoteDevicesCount() > 0) || state.getGroupCallState().isConnected()) {
recipientName.setText(state.getRemoteParticipantsDescription(getContext())); recipientName.setText(state.getRemoteParticipantsDescription(getContext()));
} else if (state.getGroupCallState().isNotIdle()) {
recipientName.setText(getContext().getString(R.string.WebRtcCallView__s_group_call, Recipient.resolved(recipientId).getDisplayName(getContext())));
} }
if (state.getGroupCallState().isNotIdle() && participantCount != null) { if (state.getGroupCallState().isNotIdle() && participantCount != null) {
@ -356,7 +358,6 @@ public class WebRtcCallView extends FrameLayout {
recipientId = recipient.getId(); recipientId = recipient.getId();
if (recipient.isGroup()) { if (recipient.isGroup()) {
recipientName.setText(getContext().getString(R.string.WebRtcCallView__s_group_call, recipient.getDisplayName(getContext())));
if (toolbar.getMenu().findItem(R.id.menu_group_call_participants_list) == null) { if (toolbar.getMenu().findItem(R.id.menu_group_call_participants_list) == null) {
toolbar.inflateMenu(R.menu.group_call); toolbar.inflateMenu(R.menu.group_call);

View file

@ -114,7 +114,8 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
WebRtcServiceStateBuilder.CallInfoStateBuilder builder = currentState.builder() WebRtcServiceStateBuilder.CallInfoStateBuilder builder = currentState.builder()
.changeCallInfoState() .changeCallInfoState()
.remoteDevicesCount(peekInfo.getDeviceCount()) .remoteDevicesCount(peekInfo.getDeviceCount())
.participantLimit(peekInfo.getMaxDevices()); .participantLimit(peekInfo.getMaxDevices())
.clearParticipantMap();
for (Recipient recipient : callParticipants) { for (Recipient recipient : callParticipants) {
builder.putParticipant(recipient, CallParticipant.createRemote(new CallParticipantId(recipient), recipient, null, new BroadcastVideoSink(null), true, true, 0, false, 0)); builder.putParticipant(recipient, CallParticipant.createRemote(new CallParticipantId(recipient), recipient, null, new BroadcastVideoSink(null), true, true, 0, false, 0));