Skip to content

Commit

Permalink
fix: crash when answering a call (WPB-6183) - cherrypick (#2705)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohassine committed Feb 14, 2024
1 parent a6b9a5f commit 275ba25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Expand Up @@ -25,7 +25,7 @@ import com.wire.kalium.logic.data.id.QualifiedID
data class UICallParticipant(
val id: QualifiedID,
val clientId: String,
val name: String = "",
val name: String? = null,
val isMuted: Boolean,
val isSpeaking: Boolean = false,
val isCameraOn: Boolean,
Expand Down
Expand Up @@ -94,6 +94,7 @@ fun ParticipantTile(
onSelfUserVideoPreviewCreated: (view: View) -> Unit,
onClearSelfUserVideoPreview: () -> Unit
) {
val defaultUserName = stringResource(id = R.string.calling_participant_tile_default_user_name)
val alpha =
if (participantTitleState.hasEstablishedAudio) ContentAlpha.high else ContentAlpha.medium
Surface(
Expand Down Expand Up @@ -154,7 +155,7 @@ fun ParticipantTile(
end.linkTo((parent.end))
}
.widthIn(max = onGoingCallTileUsernameMaxWidth),
name = participantTitleState.name,
name = participantTitleState.name ?: defaultUserName,
isSpeaking = participantTitleState.isSpeaking,
hasEstablishedAudio = participantTitleState.hasEstablishedAudio
)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Expand Up @@ -842,6 +842,7 @@
<string name="calling_confirm_start_call_title_dialog">Start a call</string>
<string name="calling_confirm_start_call_description_dialog">Are you sure you want to call %1$s people?</string>
<string name="calling_confirm_start_call_action_dialog">Call</string>
<string name="calling_participant_tile_default_user_name">Default</string>
<!-- Connectivity Status Bar -->
<string name="connectivity_status_bar_return_to_call">Return to call</string>
<string name="connectivity_status_bar_connecting">Decrypting messages</string>
Expand Down

0 comments on commit 275ba25

Please sign in to comment.