Don't show remote mute in 1:1 calls.

This commit is contained in:
Greyson Parrelli
2026-06-15 14:17:44 +00:00
parent 7df015ceef
commit 930a263174
2 changed files with 10 additions and 2 deletions
@@ -89,6 +89,7 @@ object CallInfoView {
ParticipantsState(
inCallLobby = state.callState == WebRtcViewModel.State.CALL_PRE_JOIN,
ringGroup = state.ringGroup,
isGroupOrAdHocCall = state.groupCallState.isNotIdle,
includeSelf = state.groupCallState === WebRtcViewModel.GroupCallState.CONNECTED_AND_JOINED || state.groupCallState === WebRtcViewModel.GroupCallState.IDLE,
participantCount = if (state.participantCount.isPresent) state.participantCount.get().toInt() else 0,
remoteParticipants = state.allRemoteParticipants.sortedBy { it.callParticipantId.recipientId },
@@ -345,6 +346,7 @@ private fun CallInfo(
callParticipant = participant,
isSelfAdmin = controlAndInfoState.isSelfAdmin(),
isCallLink = controlAndInfoState.callLink != null,
canRemoteMute = participantsState.isGroupOrAdHocCall,
onDismiss = { selectedParticipant = null },
onMuteAudio = onMuteAudio,
onRemoveFromCall = onRemoveFromCall,
@@ -702,6 +704,7 @@ private fun UnknownMembersRowPreview() {
private data class ParticipantsState(
val inCallLobby: Boolean = false,
val ringGroup: Boolean = true,
val isGroupOrAdHocCall: Boolean = false,
val includeSelf: Boolean = false,
val participantCount: Int = 0,
val remoteParticipants: List<CallParticipant> = emptyList(),
@@ -46,6 +46,7 @@ fun ParticipantActionsSheet(
callParticipant: CallParticipant,
isSelfAdmin: Boolean,
isCallLink: Boolean,
canRemoteMute: Boolean,
onDismiss: () -> Unit,
onMuteAudio: (CallParticipant) -> Unit,
onRemoveFromCall: (CallParticipant) -> Unit,
@@ -71,6 +72,7 @@ fun ParticipantActionsSheet(
callParticipant = callParticipant,
isSelfAdmin = isSelfAdmin,
isCallLink = isCallLink,
canRemoteMute = canRemoteMute,
onDismiss = onDismiss,
onMuteAudio = onMuteAudio,
onRemoveFromCall = onRemoveFromCall,
@@ -87,6 +89,7 @@ private fun ParticipantActionsSheetContent(
callParticipant: CallParticipant,
isSelfAdmin: Boolean,
isCallLink: Boolean,
canRemoteMute: Boolean,
onDismiss: () -> Unit,
onMuteAudio: (CallParticipant) -> Unit,
onRemoveFromCall: (CallParticipant) -> Unit,
@@ -96,7 +99,7 @@ private fun ParticipantActionsSheetContent(
) {
ParticipantHeader(recipient = recipient)
if (callParticipant.isMicrophoneEnabled) {
if (canRemoteMute && callParticipant.isMicrophoneEnabled) {
Dividers.Default()
Rows.TextRow(
@@ -110,7 +113,7 @@ private fun ParticipantActionsSheetContent(
}
if (isSelfAdmin && isCallLink) {
if (!callParticipant.isMicrophoneEnabled) {
if (!(canRemoteMute && callParticipant.isMicrophoneEnabled)) {
Dividers.Default()
}
@@ -207,6 +210,7 @@ private fun ParticipantActionsSheetAdminPreview() {
),
isSelfAdmin = true,
isCallLink = true,
canRemoteMute = true,
onDismiss = {},
onMuteAudio = {},
onRemoveFromCall = {},
@@ -228,6 +232,7 @@ private fun ParticipantActionsSheetNonAdminPreview() {
),
isSelfAdmin = false,
isCallLink = false,
canRemoteMute = true,
onDismiss = {},
onMuteAudio = {},
onRemoveFromCall = {},