fix: filter out logged-in user from call member pictures in all call states

The Offering, Ended, Connected, and PipConnected call states were showing
the logged-in user's picture alongside other call members. IncomingCall and
Connecting already filtered correctly. Now all states consistently exclude
the current user via `- accountViewModel.account.signer.pubKey`.

https://claude.ai/code/session_01PFzKU8Y3nUQXhshA3MT5EM
This commit is contained in:
Claude
2026-04-03 17:20:53 +00:00
parent 31448ad1f6
commit a6c1909602
@@ -132,11 +132,15 @@ fun CallScreen(
}
is CallState.Offering -> {
val otherMembers =
remember(state.peerPubKeys) {
state.peerPubKeys - accountViewModel.account.signer.pubKey
}
if (isInPipMode) {
PipCallUI(peerPubKeys = state.peerPubKeys, statusText = stringRes(R.string.call_calling), accountViewModel = accountViewModel)
PipCallUI(peerPubKeys = otherMembers, statusText = stringRes(R.string.call_calling), accountViewModel = accountViewModel)
} else {
CallInProgressUI(
peerPubKeys = state.peerPubKeys,
peerPubKeys = otherMembers,
statusText = stringRes(R.string.call_calling),
accountViewModel = accountViewModel,
onHangup = { scope.launch { callManager.hangup() } },
@@ -202,9 +206,13 @@ fun CallScreen(
}
is CallState.Ended -> {
val otherMembers =
remember(state.peerPubKeys) {
state.peerPubKeys - accountViewModel.account.signer.pubKey
}
if (!isInPipMode) {
CallInProgressUI(
peerPubKeys = state.peerPubKeys,
peerPubKeys = otherMembers,
statusText = stringRes(R.string.call_ended),
accountViewModel = accountViewModel,
onHangup = { onCallEnded() },
@@ -451,6 +459,10 @@ private fun ConnectedCallUI(
}
// If no video or peer stopped sharing, show avatar
val otherMembers =
remember(state.allPeerPubKeys) {
state.allPeerPubKeys - accountViewModel.account.signer.pubKey
}
if (!isRemoteVideoActive) {
Column(
modifier = Modifier.fillMaxSize(),
@@ -458,13 +470,13 @@ private fun ConnectedCallUI(
verticalArrangement = Arrangement.Center,
) {
GroupCallPictures(
peerPubKeys = state.allPeerPubKeys,
peerPubKeys = otherMembers,
size = 120.dp,
accountViewModel = accountViewModel,
)
Spacer(modifier = Modifier.height(16.dp))
GroupCallNames(
peerPubKeys = state.allPeerPubKeys,
peerPubKeys = otherMembers,
accountViewModel = accountViewModel,
textColor = Color.White,
)
@@ -690,6 +702,10 @@ private fun PipConnectedCallUI(
}
}
val otherMembers =
remember(state.allPeerPubKeys) {
state.allPeerPubKeys - accountViewModel.account.signer.pubKey
}
if (!isRemoteVideoActive) {
// Show small avatar + timer in PiP
Column(
@@ -698,7 +714,7 @@ private fun PipConnectedCallUI(
verticalArrangement = Arrangement.Center,
) {
GroupCallPictures(
peerPubKeys = state.allPeerPubKeys,
peerPubKeys = otherMembers,
size = 48.dp,
accountViewModel = accountViewModel,
)