Skip to content

Commit

Permalink
fix(calling): observe self camera state in full screen mode (WPB-4719) (
Browse files Browse the repository at this point in the history
#2254)

Co-authored-by: Mojtaba Chenani <chenani@outlook.com>
  • Loading branch information
ohassine and mchenani committed Sep 25, 2023
1 parent 07c5a7d commit b333593
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,16 @@ fun FullScreenTile(
),
participantTitleState = it,
isSelfUser = selectedParticipant.isSelfUser,
isSelfUserCameraOn = selectedParticipant.isSelfUserCameraOn,
isSelfUserMuted = selectedParticipant.isSelfUserMuted,
isSelfUserCameraOn = if (selectedParticipant.isSelfUser) {
sharedCallingViewModel.callState.isCameraOn
} else {
it.isCameraOn
},
isSelfUserMuted = if (selectedParticipant.isSelfUser) {
sharedCallingViewModel.callState.isMuted!!
} else {
it.isMuted
},
shouldFill = false,
isZoomingEnabled = true,
onSelfUserVideoPreviewCreated = sharedCallingViewModel::setVideoPreview,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@ import com.wire.kalium.logic.data.user.UserId
data class SelectedParticipant(
val userId: UserId = UserId("", ""),
val clientId: String = "",
val isSelfUser: Boolean = false,
val isSelfUserCameraOn: Boolean = false,
val isSelfUserMuted: Boolean = false
val isSelfUser: Boolean = false
)
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ fun GroupCallGrid(
SelectedParticipant(
userId = participant.id,
clientId = participant.clientId,
isSelfUser = isSelfUser,
isSelfUserCameraOn = isSelfUserCameraOn,
isSelfUserMuted = isSelfUserMuted
isSelfUser = isSelfUser
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ fun CallingHorizontalView(
SelectedParticipant(
userId = participant.id,
clientId = participant.clientId,
isSelfUser = isSelfUser,
isSelfUserCameraOn = isSelfUserCameraOn,
isSelfUserMuted = isSelfUserMuted
isSelfUser = isSelfUser
)
)
}
Expand Down

0 comments on commit b333593

Please sign in to comment.