Merge pull request #3287 from vitorpamplona/claude/practical-davinci-23zall

Deduplicate emoji packs in selection event
This commit is contained in:
Vitor Pamplona
2026-06-19 17:14:45 -04:00
committed by GitHub
@@ -104,7 +104,12 @@ 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"). Address is a data
// class over (kind, pubKeyHex, dTag) — the same fields toValue() encodes — so distinct()
// dedupes on exactly the grid key.
event?.emojiPacks()?.distinct() ?: emptyList()
}
Column(