Skip to content

Commit

Permalink
fix(calling): scrolling the grid is not possible when every one have …
Browse files Browse the repository at this point in the history
…camera enabled (WPB-4530) (RC) (#2221)
  • Loading branch information
ohassine committed Sep 12, 2023
1 parent 872b1ae commit 8073d92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fun FullScreenTile(
participantTitleState = it,
isSelfUser = selectedParticipant.isSelfUser,
shouldFill = false,
shouldZoom = true,
isZoomingEnabled = true,
onSelfUserVideoPreviewCreated = sharedCallingViewModel::setVideoPreview,
onClearSelfUserVideoPreview = sharedCallingViewModel::clearVideoPreview
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fun ParticipantTile(
avatarSize: Dp = dimensions().onGoingCallUserAvatarSize,
isSelfUser: Boolean,
shouldFill: Boolean = true,
shouldZoom: Boolean = false,
isZoomingEnabled: Boolean = false,
onSelfUserVideoPreviewCreated: (view: View) -> Unit,
onClearSelfUserVideoPreview: () -> Unit
) {
Expand Down Expand Up @@ -139,9 +139,9 @@ fun ParticipantTile(
size = it
}
.pointerInput(Unit) {
// enable zooming only when camera is on
detectTransformGestures { _, gesturePan, gestureZoom, _ ->
if (shouldZoom) {
// enable zooming on full screen and when video is on
if (isZoomingEnabled) {
detectTransformGestures { _, gesturePan, gestureZoom, _ ->
zoom = (zoom * gestureZoom).coerceIn(1f, 3f)
val maxX = (size.width * (zoom - 1)) / 2
val minX = -maxX
Expand Down

0 comments on commit 8073d92

Please sign in to comment.