Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add missing nested scroll connection in goal card settings #135

Merged
merged 2 commits into from
May 17, 2024
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
123 changes: 123 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ fun GoalItemCompact(
color = MaterialTheme.colorScheme.onSecondaryContainer
)

if (savedAmount.length >= 12) {
if (savedAmount.length > 10) {
Text(
text = savedAmount,
modifier = Modifier.padding(start = 4.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
Expand Down Expand Up @@ -102,32 +103,37 @@ fun GoalCardStyle(navController: NavController) {
val currentStyle = settingsVM.goalCardStyle.observeAsState().value!!
val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior()

Scaffold(modifier = Modifier.fillMaxSize(), topBar = {
LargeTopAppBar(
modifier = Modifier.fillMaxWidth(),
title = {
Text(
text = stringResource(id = R.string.goal_card_settings_header),
maxLines = 1,
overflow = TextOverflow.Ellipsis,
fontFamily = greenstashFont,
)
}, navigationIcon = {
IconButton(onClick = {
view.weakHapticFeedback()
navController.navigateUp()
}) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = null
Scaffold(
modifier = Modifier
.fillMaxSize()
.nestedScroll(scrollBehavior.nestedScrollConnection),
topBar = {
LargeTopAppBar(
modifier = Modifier.fillMaxWidth(),
title = {
Text(
text = stringResource(id = R.string.goal_card_settings_header),
maxLines = 1,
overflow = TextOverflow.Ellipsis,
fontFamily = greenstashFont,
)
}
}, scrollBehavior = scrollBehavior, colors = TopAppBarDefaults.largeTopAppBarColors(
containerColor = MaterialTheme.colorScheme.surface,
scrolledContainerColor = MaterialTheme.colorScheme.surface,
}, navigationIcon = {
IconButton(onClick = {
view.weakHapticFeedback()
navController.navigateUp()
}) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = null
)
}
}, scrollBehavior = scrollBehavior, colors = TopAppBarDefaults.largeTopAppBarColors(
containerColor = MaterialTheme.colorScheme.surface,
scrolledContainerColor = MaterialTheme.colorScheme.surface,
)
)
)
}) { paddingValues ->
}
) { paddingValues ->
Column(
modifier = Modifier
.fillMaxSize()
Expand Down
Loading