fix: dedupe emoji pack addresses in My Emoji List grid

A kind 10030 emoji selection event can carry the same `a` tag more than
once. MyEmojiListScreen keys its LazyVerticalGrid items by
address.toValue(), so a duplicate address crashed Compose with
"Key ... was already used". Deduplicate on the same value used as the
grid key before rendering.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012fxWguG7dXgwwe2Et3JBjR
This commit is contained in:
Claude
2026-06-19 21:01:17 +00:00
parent a99e67d8be
commit e5cb5439ff
@@ -104,7 +104,11 @@ private fun MyEmojiListView(
selectionNote,
accountViewModel,
) { event ->
event?.emojiPacks() ?: emptyList()
// The kind 10030 selection event can carry the same `a` tag more than once (e.g. a pack
// added twice). The grid below keys items by `address.toValue()`, so duplicates would
// throw an IllegalArgumentException ("Key ... was already used"). Dedupe on the same
// value used as the key.
event?.emojiPacks()?.distinctBy { it.toValue() } ?: emptyList()
}
Column(