diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/emojipacks/membershipManagement/MyEmojiListScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/emojipacks/membershipManagement/MyEmojiListScreen.kt index 4016e869f3..c9ad83d803 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/emojipacks/membershipManagement/MyEmojiListScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/emojipacks/membershipManagement/MyEmojiListScreen.kt @@ -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(