fix(bookmarks): show eventStore content as fallback for bookmarks without hydrated content

- Enrich bookmarks with content from externalEventStore when hydration hasn't populated yet
- Keeps sidebar from showing only event IDs while background hydration continues
This commit is contained in:
Gigi
2025-10-22 01:04:23 +02:00
parent 347e23ff6f
commit 6def58f128

View File

@@ -293,7 +293,10 @@ class BookmarkController {
const enriched = allBookmarks.map(b => ({
...b,
tags: b.tags || [],
content: b.content || ''
// Prefer hydrated content; fallback to any cached event content in external store
content: b.content && b.content.length > 0
? b.content
: (this.externalEventStore?.getEvent(b.id)?.content || '')
}))
const sortedBookmarks = enriched