Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.GridItemSpan
Expand Down Expand Up @@ -63,7 +62,9 @@ fun HomeScreenContentCategoriesTab(
verticalArrangement = Arrangement.spacedBy(12.dp),
contentPadding = PaddingValues(
top = WindowInsets.statusBars.asPaddingValues().calculateTopPadding() + 100.dp,
bottom = 16.dp
bottom = 16.dp,
start = 16.dp,
end = 16.dp
)
) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.cairosquad.design_system.basic_component.Chip
import com.cairosquad.design_system.modifier.fillWidthOfParent
import com.cairosquad.design_system.theme.MovioTheme

@Composable
Expand All @@ -23,7 +24,8 @@ fun CategoriesChips(
) {
LazyRow(
modifier = modifier
.fillMaxWidth(),
.fillMaxWidth()
.fillWidthOfParent(16.dp),
verticalAlignment = Alignment.CenterVertically,
contentPadding = contentPadding,
horizontalArrangement = Arrangement.spacedBy(12.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class HomeViewModel @Inject constructor(
}
viewModelScope.launch {
delay(500L)
updateState { it.copy(isRefreshing = false) }
updateState { it.copy(isRefreshing = false, dataRequestStatus = DataRequestStatus.SUCCESS) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ class MyRatingsViewModelTest {
}
}

@Test
fun `onSeriesClicked sends NavigateToSeriesDetails`() = runTest {
viewModel.effect.test {
viewModel.onSeriesClick(42L)
assertEquals(MyRatingsEffect.NavigateToSeriesDetails(42L), awaitItem())
}
}

@Test
fun `onUndoClicked with movie restores rating`() = runTest {
viewModel.updateState { it.copy(deletedItems = listOf("movie, 10, 3")) }
Expand Down