diff --git a/app/src/commonMain/kotlin/com/codebutler/farebot/shared/ui/screen/HelpScreen.kt b/app/src/commonMain/kotlin/com/codebutler/farebot/shared/ui/screen/HelpScreen.kt index 589399692..a48861868 100644 --- a/app/src/commonMain/kotlin/com/codebutler/farebot/shared/ui/screen/HelpScreen.kt +++ b/app/src/commonMain/kotlin/com/codebutler/farebot/shared/ui/screen/HelpScreen.kt @@ -280,14 +280,14 @@ fun ExploreContent( .padding(horizontal = 12.dp, vertical = 8.dp), ) } - items(cards, key = { it.nameRes.key }) { card -> + items(cards, key = { it.uniqueKey }) { card -> CardImageTile( card = card, cardName = cardNames[card.nameRes.key] ?: "", isSupported = card.cardType in supportedCardTypes, isKeysRequired = card.keysRequired && card.keyBundle !in loadedKeyBundles, onTap = { - selectedCardKey = card.nameRes.key + selectedCardKey = card.uniqueKey }, ) } @@ -337,7 +337,7 @@ fun ExploreContent( // Bottom sheet for selected card details val selectedCard = selectedCardKey?.let { key -> - supportedCards.find { it.nameRes.key == key } + supportedCards.find { it.uniqueKey == key } } if (selectedCard != null) { ModalBottomSheet( diff --git a/transit/src/commonMain/kotlin/com/codebutler/farebot/transit/CardInfo.kt b/transit/src/commonMain/kotlin/com/codebutler/farebot/transit/CardInfo.kt index b09830e52..1de020ff1 100644 --- a/transit/src/commonMain/kotlin/com/codebutler/farebot/transit/CardInfo.kt +++ b/transit/src/commonMain/kotlin/com/codebutler/farebot/transit/CardInfo.kt @@ -41,4 +41,6 @@ data class CardInfo( /** Brand color as 0xRRGGBB (no alpha). Null if unknown — UI will use a theme-appropriate fallback. */ val brandColor: Int?, val credits: List = emptyList(), -) +) { + val uniqueKey: String get() = "${nameRes.key}:${cardType.name}" +}