Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Added color to accounts labels in transactions list Behind IvyFeature…
Browse files Browse the repository at this point in the history
…Toggle( Reviews Resolved)
  • Loading branch information
shamim-emon committed Oct 20, 2024
1 parent 184374b commit 4354e31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class IvyFeatures @Inject constructor() : Features {
key = "show_account_color",
group = FeatureGroup.Other,
name = "Show Account Color",
description = "Show account specific colors for accounts in transactions "
description = "Show account specific colors for accounts in transactions",
defaultValue = false
)

override val allFeatures: List<BoolFeature>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,14 @@ private fun TransactionHeaderRow(
)

val accountBackgroundColor = if (shouldShowAccountSpecificColorInTransactions) {
account?.color?.toComposeColor()
account?.color?.toComposeColor() ?: UI.colors.pure
} else {
UI.colors.pure
}

TransactionBadge(
text = account?.name ?: stringResource(R.string.deleted),
backgroundColor = accountBackgroundColor ?: UI.colors.pure,
backgroundColor = accountBackgroundColor,
icon = account?.icon,
defaultIcon = R.drawable.ic_custom_account_s
) {
Expand Down

0 comments on commit 4354e31

Please sign in to comment.