Merge branch 'github/main'

pull/148/head
kbuilder 2 years ago
commit 0a3b3af2ed

@ -21,7 +21,6 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides import androidx.compose.foundation.layout.WindowInsetsSides
import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeDrawing import androidx.compose.foundation.layout.safeDrawing
import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
@ -35,7 +34,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel import androidx.hilt.navigation.compose.hiltViewModel
import com.google.samples.apps.nowinandroid.core.model.data.FollowableAuthor import com.google.samples.apps.nowinandroid.core.model.data.FollowableAuthor
import com.google.samples.apps.nowinandroid.core.model.data.FollowableTopic import com.google.samples.apps.nowinandroid.core.model.data.FollowableTopic
@ -152,7 +150,6 @@ private fun InterestsContent(
topics = uiState.topics, topics = uiState.topics,
onTopicClick = navigateToTopic, onTopicClick = navigateToTopic,
onFollowButtonClick = followTopic, onFollowButtonClick = followTopic,
modifier = Modifier.padding(top = 8.dp)
) )
} }
1 -> { 1 -> {
@ -160,7 +157,6 @@ private fun InterestsContent(
authors = uiState.authors, authors = uiState.authors,
onAuthorClick = navigateToAuthor, onAuthorClick = navigateToAuthor,
onFollowButtonClick = followAuthor, onFollowButtonClick = followAuthor,
modifier = Modifier.padding(top = 8.dp)
) )
} }
} }

@ -16,6 +16,7 @@
package com.google.samples.apps.nowinandroid.feature.interests package com.google.samples.apps.nowinandroid.feature.interests
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides import androidx.compose.foundation.layout.WindowInsetsSides
@ -40,7 +41,8 @@ fun TopicsTabContent(
modifier: Modifier = Modifier modifier: Modifier = Modifier
) { ) {
LazyColumn( LazyColumn(
modifier = modifier.padding(horizontal = 16.dp) modifier = modifier.padding(horizontal = 16.dp),
contentPadding = PaddingValues(top = 8.dp)
) { ) {
topics.forEach { followableTopic -> topics.forEach { followableTopic ->
item { item {
@ -75,7 +77,8 @@ fun AuthorsTabContent(
modifier: Modifier = Modifier modifier: Modifier = Modifier
) { ) {
LazyColumn( LazyColumn(
modifier = modifier.padding(horizontal = 16.dp) modifier = modifier.padding(horizontal = 16.dp),
contentPadding = PaddingValues(top = 8.dp)
) { ) {
authors.forEach { followableAuthor -> authors.forEach { followableAuthor ->
item { item {

Loading…
Cancel
Save