fix(home, explore): remove elevation from top bar colors when scrolled

This commit is contained in:
Diego Beraldin 2023-09-24 16:17:38 +02:00
parent 2d3108715a
commit 4acaca39de
2 changed files with 8 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.TopAppBarScrollBehavior
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
@ -37,6 +38,9 @@ internal fun PostsTopBar(
) {
TopAppBar(
scrollBehavior = scrollBehavior,
colors = TopAppBarDefaults.topAppBarColors(
scrolledContainerColor = MaterialTheme.colorScheme.surface,
),
navigationIcon = {
if (listingType != null) {
Image(

View File

@ -9,6 +9,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.TopAppBarScrollBehavior
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
@ -33,6 +34,9 @@ internal fun CommunityTopBar(
) {
TopAppBar(
scrollBehavior = scrollBehavior,
colors = TopAppBarDefaults.topAppBarColors(
scrolledContainerColor = MaterialTheme.colorScheme.surface,
),
navigationIcon = {
Image(
modifier = Modifier.onClick {