feat: ensure kind:1 events display their text content in bookmarks bar

- Update hydrateItems to parse content for all events with text
- Previously, kind:1 events without URLs would appear empty in the bookmarks list
- Now any kind:1 event will display its text content appropriately
- Improves handling of short-form text notes in bookmarks
This commit is contained in:
Gigi
2025-10-21 23:50:12 +02:00
parent 4316c46a4d
commit d20cc684c3

View File

@@ -184,6 +184,9 @@ export function hydrateItems(
}
}
// Ensure all events with content get parsed content for proper rendering
const parsedContent = content ? (getParsedContent(content) as ParsedContent) : undefined
return {
...item,
pubkey: ev.pubkey || item.pubkey,
@@ -191,7 +194,7 @@ export function hydrateItems(
created_at: ev.created_at || item.created_at,
kind: ev.kind || item.kind,
tags: ev.tags || item.tags,
parsedContent: ev.content ? (getParsedContent(content) as ParsedContent) : item.parsedContent
parsedContent: parsedContent || item.parsedContent
}
})
.filter(item => {