Skip to content

Commit fcbe6cd

Browse files
committed
chore(flipcash/pools): hide win badge if winnings is not greater than zero
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent f5dc9a9 commit fcbe6cd

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

apps/flipcash/features/pools/src/main/kotlin/com/flipcash/app/pools/internal/list/components/CompletedPoolStatusRow.kt

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,22 @@ internal fun CompletedPoolStatusRow(
5252
if (resolution is PoolResolution.DecisionMade) {
5353
when (summary) {
5454
is PoolUserSummary.Won -> {
55-
CodeChip(
56-
shape = CodeTheme.shapes.small,
57-
backgroundColor = CodeTheme.colors.surfaceSuccess,
58-
) {
59-
Text(
60-
stringResource(
61-
R.string.subtitle_wonPool,
62-
summary.amountWon.formatted(
63-
formatting = Fiat.Formatting.Truncated
64-
)
65-
),
66-
style = CodeTheme.typography.textSmall,
67-
color = CodeTheme.colors.successText,
68-
)
55+
if (summary.amountWon > Fiat.Zero) {
56+
CodeChip(
57+
shape = CodeTheme.shapes.small,
58+
backgroundColor = CodeTheme.colors.surfaceSuccess,
59+
) {
60+
Text(
61+
stringResource(
62+
R.string.subtitle_wonPool,
63+
summary.amountWon.formatted(
64+
formatting = Fiat.Formatting.Truncated
65+
)
66+
),
67+
style = CodeTheme.typography.textSmall,
68+
color = CodeTheme.colors.successText,
69+
)
70+
}
6971
}
7072
}
7173

0 commit comments

Comments
 (0)