mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-08 23:54:39 +00:00
Merge pull request #3766 from vitorpamplona/claude/lazygrid-duplicate-key-v4k7sj
Fix duplicate app entries in Discover Apps grid
This commit is contained in:
+4
@@ -619,6 +619,10 @@ private fun List<Note>.toDiscoverApps(
|
||||
matchAuthor(author)
|
||||
}.mapNotNull { it.toDiscoverNostrApp() }
|
||||
.filter { it.app.coordinate !in excludeCoordinates }
|
||||
// The observed store can surface the same addressable manifest twice (a replaceable note whose
|
||||
// new version mutates its sort key inside the backing set), so collapse by coordinate to keep the
|
||||
// grid keys unique — otherwise LazyVerticalGrid throws on the duplicate "ns:"/"np:" key.
|
||||
.distinctBy { it.app.coordinate }
|
||||
.take(DISCOVER_NOSTR_LIMIT)
|
||||
.toList()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user