Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
)
}
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> = emptyList(),
)
) {
val uniqueKey: String get() = "${nameRes.key}:${cardType.name}"
}