diff --git a/dashboard/src/main/java/org/openedx/courses/presentation/AllEnrolledCoursesView.kt b/dashboard/src/main/java/org/openedx/courses/presentation/AllEnrolledCoursesView.kt index ea044de54..16ea97943 100644 --- a/dashboard/src/main/java/org/openedx/courses/presentation/AllEnrolledCoursesView.kt +++ b/dashboard/src/main/java/org/openedx/courses/presentation/AllEnrolledCoursesView.kt @@ -20,7 +20,6 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.GridItemSpan -import androidx.compose.foundation.lazy.grid.LazyGridItemSpanScope import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.foundation.lazy.grid.items import androidx.compose.foundation.lazy.grid.rememberLazyGridState @@ -163,7 +162,6 @@ private fun AllEnrolledCoursesView( val scaffoldState = rememberScaffoldState() val scrollState = rememberLazyGridState() val columns = if (windowSize.isTablet) 3 else 2 - val span: (LazyGridItemSpanScope) -> GridItemSpan = { GridItemSpan(columns) } val pullRefreshState = rememberPullRefreshState( refreshing = state.refreshing, onRefresh = { onAction(AllEnrolledCoursesAction.SwipeRefresh) } @@ -329,7 +327,7 @@ private fun AllEnrolledCoursesView( } ) } - item(span = span) { + item(span = { GridItemSpan(columns) }) { if (state.canLoadMore) { Box( modifier = Modifier diff --git a/whatsnew/src/main/java/org/openedx/whatsnew/presentation/whatsnew/WhatsNewFragment.kt b/whatsnew/src/main/java/org/openedx/whatsnew/presentation/whatsnew/WhatsNewFragment.kt index c8a65d5fd..541877ee2 100644 --- a/whatsnew/src/main/java/org/openedx/whatsnew/presentation/whatsnew/WhatsNewFragment.kt +++ b/whatsnew/src/main/java/org/openedx/whatsnew/presentation/whatsnew/WhatsNewFragment.kt @@ -11,7 +11,6 @@ import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -256,7 +255,9 @@ private fun WhatsNewScreenPortrait( verticalArrangement = Arrangement.spacedBy(24.dp), ) { HorizontalPager( - modifier = Modifier.fillMaxWidth(), + modifier = Modifier + .fillMaxWidth() + .weight(1.0f), verticalAlignment = Alignment.Top, state = pagerState ) { page -> @@ -268,7 +269,6 @@ private fun WhatsNewScreenPortrait( contentDescription = null ) } - Spacer(modifier = Modifier.weight(1.0f)) Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(20.dp),