Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
Signed-off-by: starry-shivam <[email protected]>
  • Loading branch information
starry-shivam committed Mar 30, 2024
1 parent d70ef5f commit f795bf5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ fun GoalInfoScreen(goalId: String, navController: NavController) {
}
if (goalData.transactions.isNotEmpty()) {
TransactionItem(goalData.getOrderedTransactions(), currencySymbol, viewModel)
// Show tooltip for library screen.
// Show tooltip for swipe functionality.
LaunchedEffect(key1 = true) {
if (viewModel.shouldShowTransactionTip()) {
val result = snackBarHostState.showSnackbar(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.FilledTonalButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.surfaceColorAtElevation
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -114,6 +116,11 @@ fun CongratsScreen(navController: NavController) {
modifier = Modifier
.fillMaxWidth()
.padding(start = 16.dp, end = 16.dp, bottom = 16.dp),
colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.surfaceColorAtElevation(
4.dp
)
)
) {
Column(
modifier = Modifier.padding(16.dp),
Expand All @@ -129,7 +136,7 @@ fun CongratsScreen(navController: NavController) {

Text(
text = stringResource(id = R.string.goal_achieved_subtext),
style = MaterialTheme.typography.bodyLarge,
style = MaterialTheme.typography.bodyMedium,
fontFamily = greenstashFont,
fontWeight = FontWeight.Normal
)
Expand All @@ -146,6 +153,7 @@ fun CongratsScreen(navController: NavController) {
shape = RoundedCornerShape(12.dp),
modifier = Modifier
.fillMaxWidth()
.height(44.dp)
.padding(horizontal = 16.dp)
) {
Text(text = stringResource(id = R.string.goal_achieved_button))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ fun InputScreen(editGoalId: String?, navController: NavController) {
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Text),
)

Spacer(modifier = Modifier.height(22.dp))
Spacer(modifier = Modifier.height(18.dp))

Button(
onClick = {
Expand All @@ -637,7 +637,7 @@ fun InputScreen(editGoalId: String?, navController: NavController) {
},
modifier = Modifier
.fillMaxWidth(0.86f)
.height(55.dp),
.height(45.dp),
shape = RoundedCornerShape(14.dp),
) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
Expand Down Expand Up @@ -142,10 +141,6 @@ fun WelcomeScreen(navController: NavController) {
.padding(horizontal = 24.dp, vertical = 12.dp)
)

Row {

}

OutlinedButton(
onClick = { currencyDialog.value = true },
modifier = Modifier.animateContentSize(),
Expand All @@ -164,7 +159,12 @@ fun WelcomeScreen(navController: NavController) {

}

Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) {
Box(
modifier = Modifier
.fillMaxWidth()
.height(44.dp),
contentAlignment = Alignment.Center
) {
FilledTonalButton(
onClick = {
viewModel.saveOnBoardingState(completed = true)
Expand Down

0 comments on commit f795bf5

Please sign in to comment.