Don't show members button if there are no remote people.

fork-5.53.8
Alex Hart 2020-11-24 11:49:40 -04:00
rodzic 0bda1d46a2
commit d4748efd42
3 zmienionych plików z 11 dodań i 10 usunięć

Wyświetl plik

@ -217,6 +217,13 @@ public class WebRtcCallView extends FrameLayout {
int statusBarHeight = ViewUtil.getStatusBarHeight(this);
statusBarGuideline.setGuidelineBegin(statusBarHeight);
toolbar.inflateMenu(R.menu.group_call);
View showParticipants = toolbar.getMenu().findItem(R.id.menu_group_call_participants_list).getActionView();
showParticipants.setOnClickListener(unused -> showParticipantsList());
participantCount = showParticipants.findViewById(R.id.show_participants_menu_counter);
}
@Override
@ -357,14 +364,6 @@ public class WebRtcCallView extends FrameLayout {
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) {
toolbar.inflateMenu(R.menu.group_call);
View showParticipants = toolbar.getMenu().findItem(R.id.menu_group_call_participants_list).getActionView();
showParticipants.setOnClickListener(unused -> showParticipantsList());
participantCount = showParticipants.findViewById(R.id.show_participants_menu_counter);
}
} else {
recipientName.setText(recipient.getDisplayName(getContext()));
}

Wyświetl plik

@ -57,7 +57,7 @@ public final class WebRtcControls {
}
boolean displayGroupMembersButton() {
return groupCallState.isAtLeast(GroupCallState.CONNECTING);
return groupCallState.isAtLeast(GroupCallState.CONNECTING) && hasAtLeastOneRemote;
}
boolean displayEndCall() {

Wyświetl plik

@ -6,8 +6,10 @@
<item
android:id="@+id/menu_group_call_participants_list"
android:title="@string/WebRtcCallView__view_participants_list"
android:visible="false"
app:actionLayout="@layout/show_participants_menu_view"
app:showAsAction="always"
tools:ignore="AlwaysShowAction" />
tools:ignore="AlwaysShowAction"
tools:visible="true" />
</menu>