Skip to content
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
1 change: 1 addition & 0 deletions apps/flipcash/core/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@
<string name="prompt_description_unlinkEmail">Your email address will be removed from your profile.</string>
<string name="title_sectionDisplayName">Display Name</string>
<string name="title_sectionSocialAccounts">Social Accounts</string>
<string name="title_sectionAccountInfo">Account Info</string>
<string name="subtitle_noDisplayName">No display name set</string>
<string name="subtitle_noSocialAccounts">No social accounts linked</string>
<string name="prompt_title_unlinkSocialAccount">Unlink Account?</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ internal fun LabsScreenContent(viewModel: LabsScreenViewModel) {
.verticalScrollStateGradient(
scrollState = state,
isLongGradient = true,
).sheetResignmentBehavior(state),
)
.sheetResignmentBehavior(state),
contentPadding = PaddingValues(bottom = CodeTheme.dimens.grid.x3),
) {
item(contentType = "section_header") {
SectionHeader(stringResource(R.string.title_settingsSectionFeatures))
item(contentType = "section_header") {
SectionHeader(
modifier = Modifier.padding(horizontal = CodeTheme.dimens.inset),
title = stringResource(R.string.title_settingsSectionFeatures)
)
}
items(betaFlags, key = { it.flag.key }, contentType = { "feature_flag" }) { feature ->
if (feature.flag.isOptionFlag) {
Expand Down Expand Up @@ -113,7 +117,12 @@ internal fun LabsScreenContent(viewModel: LabsScreenViewModel) {
}
}

item(contentType = "section_header") { SectionHeader(stringResource(R.string.title_settingsSectionHomeScreen)) }
item(contentType = "section_header") {
SectionHeader(
modifier = Modifier.padding(horizontal = CodeTheme.dimens.inset),
title = stringResource(R.string.title_settingsSectionHomeScreen)
)
}
item(contentType = "list_item") {
ListItem(
headline = stringResource(R.string.title_settingsButtonOrder),
Expand All @@ -124,7 +133,12 @@ internal fun LabsScreenContent(viewModel: LabsScreenViewModel) {
}

if (isStaff) {
item(contentType = "section_header") { SectionHeader(stringResource(R.string.title_settingsSectionDeveloper)) }
item(contentType = "section_header") {
SectionHeader(
modifier = Modifier.padding(horizontal = CodeTheme.dimens.inset),
title = stringResource(R.string.title_settingsSectionDeveloper)
)
}
item(contentType = "list_item") {
ListItem(
headline = stringResource(R.string.subtitle_settingsUserFlags),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import com.flipcash.core.R
import com.getcode.navigation.core.LocalCodeNavigator
import com.getcode.ui.components.AppBarDefaults
import com.getcode.ui.components.AppBarWithTitle
import com.getcode.ui.core.noRippleClickable
import kotlinx.coroutines.flow.filterIsInstance
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
Expand All @@ -35,7 +34,6 @@ fun MyAccountScreen() {
AppBarWithTitle(
title = {
AppBarDefaults.Title(
modifier = Modifier.noRippleClickable { viewModel.dispatchEvent(MyAccountScreenViewModel.Event.OnTitleClicked) },
text = stringResource(R.string.title_myAccount),
)
},
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
package com.flipcash.app.myaccount.internal

import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.AnimatedContentTransitionScope
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.animation.togetherWith
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.flipcash.app.menu.MenuList
import com.getcode.theme.CodeTheme

@Composable
internal fun MyAccountScreen(viewModel: MyAccountScreenViewModel) {
Expand All @@ -31,38 +19,10 @@ private fun MyAccountScreenContent(
state: MyAccountScreenViewModel.State,
dispatch: (MyAccountScreenViewModel.Event) -> Unit
) {
Column(
MenuList(
modifier = Modifier.fillMaxSize(),
) {
AnimatedContent(
modifier = Modifier.fillMaxWidth(),
targetState = state.showAccountInfo,
transitionSpec = {
slideIntoContainer(AnimatedContentTransitionScope.SlideDirection.Down) togetherWith
slideOutOfContainer(AnimatedContentTransitionScope.SlideDirection.Up)
}
) { show ->
if (show) {
AccountInfoHeader(
state = state,
dispatch = dispatch,
modifier = Modifier
.fillMaxWidth()
.padding(
horizontal = CodeTheme.dimens.inset,
vertical = CodeTheme.dimens.grid.x2
)
)
} else {
Spacer(Modifier.fillMaxWidth())
}
}

MenuList(
modifier = Modifier.weight(1f),
items = state.items,
showChevrons = true,
onItemClick = { dispatch(it.action) }
)
}
}
items = state.items,
showChevrons = true,
onItemClick = { dispatch(it.action) }
)
}
Loading
Loading