diff --git a/screen/onboarding/src/main/java/com/ivy/onboarding/components/Suggestions.kt b/screen/onboarding/src/main/java/com/ivy/onboarding/components/Suggestions.kt index eb066ffdd7..ad8ba012f9 100644 --- a/screen/onboarding/src/main/java/com/ivy/onboarding/components/Suggestions.kt +++ b/screen/onboarding/src/main/java/com/ivy/onboarding/components/Suggestions.kt @@ -146,9 +146,9 @@ private fun Preview() { IvyWalletComponentPreview { Suggestions( suggestions = listOf( - Account("Cash", isVisible = true, color = Green.toArgb()), - Account("Bank", isVisible = true, color = Red.toArgb()), - Account("Revolut", isVisible = true, color = Purple.toArgb()) + Account("Cash", isVisible = true, color = Green.toArgb()), + Account("Bank", isVisible = true, color = Red.toArgb()), + Account("Revolut", isVisible = true, color = Purple.toArgb()) ), onAddSuggestion = { } ) { diff --git a/screen/planned-payments/src/main/java/com/ivy/planned/edit/EditPlannedScreen.kt b/screen/planned-payments/src/main/java/com/ivy/planned/edit/EditPlannedScreen.kt index 1bb09b40fd..df54f2b8bc 100644 --- a/screen/planned-payments/src/main/java/com/ivy/planned/edit/EditPlannedScreen.kt +++ b/screen/planned-payments/src/main/java/com/ivy/planned/edit/EditPlannedScreen.kt @@ -437,7 +437,7 @@ private fun Preview() { currency = "BGN", description = null, category = null, - account = Account(name = "phyre", isVisible = true, color = Orange.toArgb()), + account = Account(name = "phyre", isVisible = true, color = Orange.toArgb()), amount = 0.0, transactionType = TransactionType.INCOME, categories = persistentListOf(), diff --git a/screen/planned-payments/src/main/java/com/ivy/planned/list/PlannedPaymentsScreen.kt b/screen/planned-payments/src/main/java/com/ivy/planned/list/PlannedPaymentsScreen.kt index 5a9c6d6d50..4931bc4d10 100644 --- a/screen/planned-payments/src/main/java/com/ivy/planned/list/PlannedPaymentsScreen.kt +++ b/screen/planned-payments/src/main/java/com/ivy/planned/list/PlannedPaymentsScreen.kt @@ -108,7 +108,7 @@ private fun BoxWithConstraintsScope.UI( @Composable private fun Preview() { IvyWalletPreview { - val account = Account(name = "Cash", isVisible = true, color = Green.toArgb()) + val account = Account(name = "Cash", isVisible = true, color = Green.toArgb()) val food = Category( name = NotBlankTrimmedString.unsafe("Food"), color = ColorInt(Purple.toArgb()), diff --git a/shared/data/model-testing/src/main/java/com/ivy/data/model/testing/ArbAccount.kt b/shared/data/model-testing/src/main/java/com/ivy/data/model/testing/ArbAccount.kt index 0224696bea..b70c0446dc 100644 --- a/shared/data/model-testing/src/main/java/com/ivy/data/model/testing/ArbAccount.kt +++ b/shared/data/model-testing/src/main/java/com/ivy/data/model/testing/ArbAccount.kt @@ -27,6 +27,7 @@ fun Arb.Companion.account( icon = Arb.maybe(Arb.iconAsset()).bind(), includeInBalance = includeInBalance.getOrElse { Arb.boolean().bind() }, orderNum = orderNum.getOrElse { Arb.double().bind() }, + isVisible = true ) } diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/domain/deprecated/logic/model/CreateAccountData.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/domain/deprecated/logic/model/CreateAccountData.kt index 03809757cd..78f78d02d4 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/domain/deprecated/logic/model/CreateAccountData.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/domain/deprecated/logic/model/CreateAccountData.kt @@ -2,6 +2,7 @@ package com.ivy.wallet.domain.deprecated.logic.model import androidx.compose.ui.graphics.Color +@Suppress("DataClassDefaultValues") data class CreateAccountData( val name: String, val currency: String, diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/edit/core/EditBottomSheet.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/edit/core/EditBottomSheet.kt index 29aa3f9b01..b7d6587135 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/edit/core/EditBottomSheet.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/edit/core/EditBottomSheet.kt @@ -814,7 +814,7 @@ private fun Preview() { acc1, Account("DSK", isVisible = true, color = GreenDark.toArgb()), Account("phyre", isVisible = true, color = GreenLight.toArgb()), - Account("Revolut" ,isVisible = true, color = IvyDark.toArgb()), + Account("Revolut", isVisible = true, color = IvyDark.toArgb()), ), selectedAccount = acc1, toAccount = null, @@ -833,8 +833,8 @@ private fun Preview() { @Composable private fun Preview_Transfer() { IvyWalletPreview { - val acc1 = Account("Cash", isVisible = true, color = Green.toArgb()) - val acc2 = Account("DSK", isVisible = true, color = GreenDark.toArgb()) + val acc1 = Account("Cash", isVisible = true, color = Green.toArgb()) + val acc2 = Account("DSK", isVisible = true, color = GreenDark.toArgb()) BoxWithConstraints( modifier = Modifier @@ -852,8 +852,8 @@ private fun Preview_Transfer() { accounts = listOf( acc1, acc2, - Account("phyre", isVisible = true, color = GreenLight.toArgb(), icon = "cash"), - Account("Revolut", isVisible = true, color = IvyDark.toArgb()), + Account("phyre", isVisible = true, color = GreenLight.toArgb(), icon = "cash"), + Account("Revolut", isVisible = true, color = IvyDark.toArgb()), ), selectedAccount = acc1, toAccount = acc2, diff --git a/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/transaction/TransactionCard.kt b/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/transaction/TransactionCard.kt index 53f56b7fdb..3246c99e18 100644 --- a/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/transaction/TransactionCard.kt +++ b/temp/legacy-code/src/main/java/com/ivy/legacy/ui/component/transaction/TransactionCard.kt @@ -656,7 +656,7 @@ private data class AmountTypeStyle( private fun PreviewUpcomingExpense() { IvyWalletPreview { LazyColumn(Modifier.fillMaxSize()) { - val cash = Account(name = "Cash", isVisible = true, color = Green.toArgb()) + val cash = Account(name = "Cash", isVisible = true, color = Green.toArgb()) val food = Category( name = NotBlankTrimmedString.unsafe("Food"), color = ColorInt(Blue.toArgb()), @@ -695,7 +695,7 @@ private fun PreviewUpcomingExpense() { private fun PreviewUpcomingExpenseBadgeSecondRow() { IvyWalletPreview { LazyColumn(Modifier.fillMaxSize()) { - val cash = Account(name = "Cash", isVisible = true, color = Green.toArgb()) + val cash = Account(name = "Cash", isVisible = true, color = Green.toArgb()) val food = Category( name = NotBlankTrimmedString.unsafe("Food-Travel-Entertaiment-Food"), color = ColorInt(Blue.toArgb()), @@ -734,7 +734,7 @@ private fun PreviewUpcomingExpenseBadgeSecondRow() { private fun PreviewOverdueExpense() { IvyWalletPreview { LazyColumn(Modifier.fillMaxSize()) { - val cash = Account(name = "Cash", isVisible = true, color = Green.toArgb()) + val cash = Account(name = "Cash", isVisible = true, color = Green.toArgb()) val food = Category( name = NotBlankTrimmedString.unsafe("Rent"), color = ColorInt(Green.toArgb()), @@ -773,7 +773,7 @@ private fun PreviewOverdueExpense() { private fun PreviewNormalExpense() { IvyWalletPreview { LazyColumn(Modifier.fillMaxSize()) { - val cash = Account(name = "Cash", isVisible = true, color = Green.toArgb()) + val cash = Account(name = "Cash", isVisible = true, color = Green.toArgb()) val food = Category( name = NotBlankTrimmedString.unsafe("Bitovi"), color = ColorInt(Orange.toArgb()), @@ -811,7 +811,7 @@ private fun PreviewNormalExpense() { private fun PreviewIncome() { IvyWalletPreview { LazyColumn(Modifier.fillMaxSize()) { - val cash = Account(name = "DSK Bank", isVisible = true, color = Green.toArgb()) + val cash = Account(name = "DSK Bank", isVisible = true, color = Green.toArgb()) val category = Category( name = NotBlankTrimmedString.unsafe("Salary"), color = ColorInt(GreenDark.toArgb()), @@ -849,8 +849,14 @@ private fun PreviewIncome() { private fun PreviewTransfer() { IvyWalletPreview { LazyColumn(Modifier.fillMaxSize()) { - val acc1 = Account(name = "DSK Bank", color = Green.toArgb(), isVisible = true, icon = "bank") - val acc2 = Account(name = "Revolut", color = IvyDark.toArgb(), isVisible = true, icon = "revolut") + val acc1 = + Account(name = "DSK Bank", color = Green.toArgb(), isVisible = true, icon = "bank") + val acc2 = Account( + name = "Revolut", + color = IvyDark.toArgb(), + isVisible = true, + icon = "revolut" + ) item { TransactionCard( @@ -881,7 +887,8 @@ private fun PreviewTransfer() { private fun PreviewTransfer_differentCurrency() { IvyWalletPreview { LazyColumn(Modifier.fillMaxSize()) { - val acc1 = Account(name = "DSK Bank", color = Green.toArgb(), isVisible = true, icon = "bank") + val acc1 = + Account(name = "DSK Bank", color = Green.toArgb(), isVisible = true, icon = "bank") val acc2 = Account( name = "Revolut", currency = "EUR",