From c297505327b86ac96ceb199dc96eae0abfb3ae41 Mon Sep 17 00:00:00 2001 From: net <96362337+netqo@users.noreply.github.com> Date: Wed, 27 May 2026 13:16:22 -0300 Subject: [PATCH 1/2] refactor(lobby): drop dead Coinflip icon fallback GameKey.iconRes() returned the Crash drawable for Coinflip with a note that the branch only existed to keep the when exhaustive. That was a latent bug: RecentRoundRow walks every GameKey, so a Coinflip round would render with the wrong icon. Adds a proper coinflip drawable (two overlapping circles) and points the when branch at it. Also drops the leftover "notifications sheet deferred" comment at the LobbyHeader call site since the empty lambda already documents the intent. --- .../stackcasino/feature/lobby/LobbyScreen.kt | 7 ++----- app/src/main/res/drawable/ic_game_coinflip.xml | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 app/src/main/res/drawable/ic_game_coinflip.xml diff --git a/app/src/main/java/com/plainstudio/stackcasino/feature/lobby/LobbyScreen.kt b/app/src/main/java/com/plainstudio/stackcasino/feature/lobby/LobbyScreen.kt index 3c2ea60..d93421d 100644 --- a/app/src/main/java/com/plainstudio/stackcasino/feature/lobby/LobbyScreen.kt +++ b/app/src/main/java/com/plainstudio/stackcasino/feature/lobby/LobbyScreen.kt @@ -148,7 +148,7 @@ private fun SuccessContent( ) { LobbyHeader( user = data.user, - onOpenNotifications = { /* notifications sheet deferred */ }, + onOpenNotifications = {}, ) Divider() BalanceHero( @@ -1027,10 +1027,7 @@ private fun GameKey.iconRes(): Int = GameKey.Blackjack -> R.drawable.ic_game_blackjack GameKey.Crash -> R.drawable.ic_game_crash GameKey.Mines -> R.drawable.ic_game_mines - // Coinflip uses the inline "x2" badge in CoinflipCard instead of a - // drawable; this is dead for the grid path but kept to make the - // when-exhaustive contract honest. - GameKey.Coinflip -> R.drawable.ic_game_crash + GameKey.Coinflip -> R.drawable.ic_game_coinflip } private fun initialsOf(name: String): String { diff --git a/app/src/main/res/drawable/ic_game_coinflip.xml b/app/src/main/res/drawable/ic_game_coinflip.xml new file mode 100644 index 0000000..ab8bf43 --- /dev/null +++ b/app/src/main/res/drawable/ic_game_coinflip.xml @@ -0,0 +1,17 @@ + + + + From 048def0b652f94dbe5a2b39f74feba87ea872322 Mon Sep 17 00:00:00 2001 From: net <96362337+netqo@users.noreply.github.com> Date: Wed, 27 May 2026 14:06:42 -0300 Subject: [PATCH 2/2] fix(lobby): baseline-align the two labels under each game card title The right meta label (RTP / Last / Up to) uses tnum digits while the left meta label (European, Classic, Multiplier, 5x5 Grid) uses only letters. Plain Top / Bottom row alignment renders the two with a visible vertical offset because the two glyph sets report different line metrics. alignByBaseline pins them to the typographic baseline so they read as a single label pair. Coinflip's HEADS . TAILS keeps the explicit Alignment.Bottom modifier because its row mixes the badge, the title+subtitle column and the meta label - baseline alignment would tie it to the title row. --- .../stackcasino/feature/lobby/LobbyScreen.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/com/plainstudio/stackcasino/feature/lobby/LobbyScreen.kt b/app/src/main/java/com/plainstudio/stackcasino/feature/lobby/LobbyScreen.kt index d93421d..d617d58 100644 --- a/app/src/main/java/com/plainstudio/stackcasino/feature/lobby/LobbyScreen.kt +++ b/app/src/main/java/com/plainstudio/stackcasino/feature/lobby/LobbyScreen.kt @@ -537,6 +537,9 @@ private fun GameCard( fontWeight = FontWeight.SemiBold, ) Spacer(modifier = Modifier.height(8.dp)) + // alignByBaseline keeps the two labels typographically level + // even though the right side uses `tnum` digits that report + // slightly different line metrics than the plain-letter left. Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween, @@ -546,6 +549,7 @@ private fun GameCard( color = TextLow, fontSize = SmallMetaFontSize, letterSpacing = TrackedLetterSpacing, + modifier = Modifier.alignByBaseline(), ) Text( text = card.infoRight.uppercase(), @@ -553,6 +557,7 @@ private fun GameCard( fontSize = SmallMetaFontSize, letterSpacing = TrackedLetterSpacing, style = TextStyle(fontFeatureSettings = "tnum"), + modifier = Modifier.alignByBaseline(), ) } } @@ -629,11 +634,16 @@ private fun CoinflipCard( letterSpacing = TrackedLetterSpacing, ) } + // Aligns with the subtitle line of the left column instead of + // the row centre so the meta label sits on the same baseline + // as X2 PAYOUT (mockup line 173 leaves both labels at the + // foot of the card). Text( text = card.infoRight.uppercase(), color = TextLow, fontSize = MetaFontSize, letterSpacing = TrackedLetterSpacing, + modifier = Modifier.align(Alignment.Bottom), ) } }