Skip to content

Commit 9d32636

Browse files
Merge pull request #718 from Cairo-Squad/fix/category-grid-padding
fix: category grid padding.
2 parents a0bb5af + fc5270e commit 9d32636

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

ui/src/main/java/com/cairosquad/ui/home/content/HomeScreenContentCategoriesTab.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import androidx.compose.foundation.layout.WindowInsets
77
import androidx.compose.foundation.layout.asPaddingValues
88
import androidx.compose.foundation.layout.fillMaxSize
99
import androidx.compose.foundation.layout.fillMaxWidth
10-
import androidx.compose.foundation.layout.padding
1110
import androidx.compose.foundation.layout.statusBars
1211
import androidx.compose.foundation.lazy.grid.GridCells
1312
import androidx.compose.foundation.lazy.grid.GridItemSpan
@@ -63,7 +62,9 @@ fun HomeScreenContentCategoriesTab(
6362
verticalArrangement = Arrangement.spacedBy(12.dp),
6463
contentPadding = PaddingValues(
6564
top = WindowInsets.statusBars.asPaddingValues().calculateTopPadding() + 100.dp,
66-
bottom = 16.dp
65+
bottom = 16.dp,
66+
start = 16.dp,
67+
end = 16.dp
6768
)
6869
) {
6970

ui/src/main/java/com/cairosquad/ui/movio_component/CategoriesChips.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import androidx.compose.ui.Modifier
1111
import androidx.compose.ui.tooling.preview.Preview
1212
import androidx.compose.ui.unit.dp
1313
import com.cairosquad.design_system.basic_component.Chip
14+
import com.cairosquad.design_system.modifier.fillWidthOfParent
1415
import com.cairosquad.design_system.theme.MovioTheme
1516

1617
@Composable
@@ -23,7 +24,8 @@ fun CategoriesChips(
2324
) {
2425
LazyRow(
2526
modifier = modifier
26-
.fillMaxWidth(),
27+
.fillMaxWidth()
28+
.fillWidthOfParent(16.dp),
2729
verticalAlignment = Alignment.CenterVertically,
2830
contentPadding = contentPadding,
2931
horizontalArrangement = Arrangement.spacedBy(12.dp)

viewmodel/src/main/java/com/cairosquad/viewmodel/home/HomeViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class HomeViewModel @Inject constructor(
6363
}
6464
viewModelScope.launch {
6565
delay(500L)
66-
updateState { it.copy(isRefreshing = false) }
66+
updateState { it.copy(isRefreshing = false, dataRequestStatus = DataRequestStatus.SUCCESS) }
6767
}
6868
}
6969

viewmodel/src/test/java/com/cairosquad/viewmodel/rated/MyRatingsViewModelTest.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,6 @@ class MyRatingsViewModelTest {
6969
}
7070
}
7171

72-
@Test
73-
fun `onSeriesClicked sends NavigateToSeriesDetails`() = runTest {
74-
viewModel.effect.test {
75-
viewModel.onSeriesClick(42L)
76-
assertEquals(MyRatingsEffect.NavigateToSeriesDetails(42L), awaitItem())
77-
}
78-
}
79-
8072
@Test
8173
fun `onUndoClicked with movie restores rating`() = runTest {
8274
viewModel.updateState { it.copy(deletedItems = listOf("movie, 10, 3")) }

0 commit comments

Comments
 (0)