Skip to content

Commit

Permalink
chore: revert changes of #2246
Browse files Browse the repository at this point in the history
  • Loading branch information
ohassine committed Sep 22, 2023
1 parent b6dd35d commit 3b7e520
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ fun ParticipantTile(
onSelfUserVideoPreviewCreated: (view: View) -> Unit,
onClearSelfUserVideoPreview: () -> Unit
) {
val alpha = if (participantTitleState.hasEstablishedAudio) ContentAlpha.high else ContentAlpha.medium
val alpha =
if (participantTitleState.hasEstablishedAudio) ContentAlpha.high else ContentAlpha.medium
Surface(
modifier = modifier,
color = colorsScheme().callingParticipantTileBackgroundColor,
Expand Down Expand Up @@ -220,9 +221,9 @@ private fun CameraPreview(
}
}
AndroidView(
factory = { videoPreview },
update = {
factory = {
onSelfUserVideoPreviewCreated(videoPreview)
videoPreview
}
)
} else {
Expand All @@ -245,7 +246,8 @@ private fun OthersVideoRenderer(
var offsetY by remember { mutableStateOf(0f) }

val context = LocalContext.current
val rendererFillColor = (colorsScheme().callingParticipantTileBackgroundColor.value shr 32).toLong()
val rendererFillColor =
(colorsScheme().callingParticipantTileBackgroundColor.value shr 32).toLong()
if (isCameraOn || isSharingScreen) {

val videoRenderer = remember {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ fun VerticalCallingPager(
isSelfUserMuted = isSelfUserMuted,
isSelfUserCameraOn = isSelfUserCameraOn,
contentHeight = contentHeight,
onSelfVideoPreviewCreated = {
if (pagerState.currentPage == 0) {
onSelfVideoPreviewCreated(it)
}
},
onSelfVideoPreviewCreated = onSelfVideoPreviewCreated,
onSelfClearVideoPreview = onSelfClearVideoPreview,
onDoubleTap = onDoubleTap
)
Expand All @@ -118,11 +114,7 @@ fun VerticalCallingPager(
isSelfUserMuted = isSelfUserMuted,
isSelfUserCameraOn = isSelfUserCameraOn,
contentHeight = contentHeight,
onSelfVideoPreviewCreated = {
if (pagerState.currentPage == 0) {
onSelfVideoPreviewCreated(it)
}
},
onSelfVideoPreviewCreated = onSelfVideoPreviewCreated,
onSelfClearVideoPreview = onSelfClearVideoPreview,
onDoubleTap = onDoubleTap
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fun GroupCallGrid(

ParticipantTile(
modifier = Modifier
.pointerInput(isSelfUserCameraOn, isSelfUserMuted) {
.pointerInput(Unit) {
detectTapGestures(
onDoubleTap = {
onDoubleTap(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fun CallingHorizontalView(

ParticipantTile(
modifier = Modifier
.pointerInput(isSelfUserCameraOn, isSelfUserMuted) {
.pointerInput(Unit) {
detectTapGestures(
onDoubleTap = {
onDoubleTap(
Expand Down

0 comments on commit 3b7e520

Please sign in to comment.