Skip to content

Commit

Permalink
Modifier as last param
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezaeiii committed Feb 27, 2025
1 parent d8cfb9e commit ffa02cd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class TMDbContentTest {
1.1,
1,
),
) {
}
{},
)
}
onNodeWithText("name").assertIsDisplayed()
onNodeWithText("releaseDate").assertIsDisplayed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import com.sample.tmdb.common.ui.theme.rateColors

@OptIn(ExperimentalMaterialApi::class)
@Composable
fun TMDbContent(tmdbItem: TMDbItem, modifier: Modifier = Modifier, onClick: (TMDbItem) -> Unit) {
fun TMDbContent(tmdbItem: TMDbItem, onClick: (TMDbItem) -> Unit, modifier: Modifier = Modifier) {
Box(modifier = modifier) {
TMDbItemRate(
tmdbItem.voteAverage,
Expand Down Expand Up @@ -118,6 +118,7 @@ fun BoxScope.TMDbItemPoster(posterUrl: String?, tmdbItemName: String) {
ColorFilter.tint(
MaterialTheme.colors.imageTint,
)

else -> null
}
val scale =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ fun <T : TMDbItem> TabContent(items: List<T>, onClick: (TMDbItem) -> Unit) {
items(items.size) { index ->
TMDbContent(
items[index],
onClick,
Modifier
.height(320.dp)
.padding(vertical = TMDb_8_dp),
onClick,
)
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ private fun <T : TMDbItem> LazyTMDbItemGrid(lazyTMDbItems: LazyPagingItems<T>, o
tmdbItem?.let {
TMDbContent(
it,
onClick,
Modifier
.height(320.dp)
.padding(vertical = TMDb_8_dp),
onClick,
)
}
}
Expand Down

0 comments on commit ffa02cd

Please sign in to comment.