Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[Jetcaster] Apply Spotless
  • Loading branch information
yrezgui committed Dec 15, 2020
commit 064ce45860b5eeff742305a4d0b4e46b40f434ca
2 changes: 1 addition & 1 deletion Jetcaster/app/src/main/java/com/example/jetcaster/Graph.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import java.io.File
* For a real app, you would use something like Hilt/Dagger instead.
*/
object Graph {
private lateinit var okHttpClient: OkHttpClient
lateinit var okHttpClient: OkHttpClient

lateinit var database: JetcasterDatabase
private set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,21 +281,24 @@ private fun CategoryPodcastRow(
modifier: Modifier = Modifier
) {
val lastIndex = podcasts.size - 1
LazyRow(modifier = modifier,
contentPadding = PaddingValues(start = Keyline1, top = 8.dp, end = Keyline1, bottom = 24.dp)
LazyRow(
modifier = modifier,
contentPadding = PaddingValues(start = Keyline1, top = 8.dp, end = Keyline1, bottom = 24.dp)
) {
itemsIndexed(items = podcasts,
itemContent = { index: Int, (podcast, _, isFollowed): PodcastWithExtraInfo ->
TopPodcastRowItem(
podcastTitle = podcast.title,
podcastImageUrl = podcast.imageUrl,
isFollowed = isFollowed,
onToggleFollowClicked = { onTogglePodcastFollowed(podcast.uri) },
modifier = Modifier.preferredWidth(128.dp)
)
itemsIndexed(
items = podcasts,
itemContent = { index: Int, (podcast, _, isFollowed): PodcastWithExtraInfo ->
TopPodcastRowItem(
podcastTitle = podcast.title,
podcastImageUrl = podcast.imageUrl,
isFollowed = isFollowed,
onToggleFollowClicked = { onTogglePodcastFollowed(podcast.uri) },
modifier = Modifier.preferredWidth(128.dp)
)

if (index < lastIndex) Spacer(Modifier.preferredWidth(24.dp))
})
if (index < lastIndex) Spacer(Modifier.preferredWidth(24.dp))
}
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ fun Modifier.verticalGradientScrim(

var height by remember { mutableStateOf(0f) }
val brush = remember(color, numStops, startYPercentage, endYPercentage, height) {
Brush.verticalGradient(colors = colors,
startY = height * startYPercentage,
endY = height * endYPercentage
Brush.verticalGradient(
colors = colors,
startY = height * startYPercentage,
endY = height * endYPercentage
)
}

Expand Down