Skip to content

Commit

Permalink
Remove BoxWithConstraints
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandar-apostolov committed Oct 30, 2023
1 parent aad9e12 commit dda65b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ internal fun <T : ScrollableState> lazyStateWithVisibilityNotification(call: Cal
* @param content the content to be displayed.
*/
@Composable
internal fun BoxWithConstraintsScope.SpotlightContentPortrait(
internal fun SpotlightContentPortrait(
modifier: Modifier,
background: Color,
content: @Composable () -> Unit,
Expand Down Expand Up @@ -117,7 +117,7 @@ internal fun BoxWithConstraintsScope.SpotlightContentPortrait(
* @param content the content to be displayed.
*/
@Composable
internal fun BoxWithConstraintsScope.SpotlightContentLandscape(
internal fun SpotlightContentLandscape(
modifier: Modifier,
background: Color,
content: @Composable () -> Unit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package io.getstream.video.android.compose.ui.components.call.renderer.internal
import android.content.res.Configuration.ORIENTATION_LANDSCAPE
import android.content.res.Configuration.ORIENTATION_PORTRAIT
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand Down Expand Up @@ -102,10 +103,10 @@ internal fun SpotlightVideoRenderer(
val listState =
lazyStateWithVisibilityNotification(call = call, original = rememberLazyListState())

BoxWithConstraints(modifier = modifier.fillMaxSize()) {
Box(modifier = modifier.fillMaxSize()) {
if (ORIENTATION_LANDSCAPE == orientation) {
Row {
this@BoxWithConstraints.SpotlightContentLandscape(
SpotlightContentLandscape(
modifier = modifier.weight(0.7f),
background = VideoTheme.colors.participantContainerBackground,
) {
Expand All @@ -129,7 +130,7 @@ internal fun SpotlightVideoRenderer(
Column(
modifier = Modifier.padding(bottom = VideoTheme.dimens.participantsGridPadding * 2),
) {
this@BoxWithConstraints.SpotlightContentPortrait(
SpotlightContentPortrait(
modifier = modifier.weight(1f),
background = VideoTheme.colors.participantContainerBackground,
) {
Expand Down

0 comments on commit dda65b9

Please sign in to comment.