mirror of
https://github.com/dergigi/boris.git
synced 2025-12-29 04:24:34 +01:00
fix: show bookmarks even when they only have IDs (no content yet)
Root cause: hasContent() was filtering out bookmarks that didn't have content text yet. When we skip event fetching for large collections (>100 IDs), bookmarks only have IDs as placeholders, causing 511/522 bookmarks to be filtered out. Solution: Updated hasContent() to return true if bookmark has either: - Valid content (original behavior) - OR a valid ID (placeholder until events are fetched) This allows all 522 bookmarks to appear in the sidebar immediately, showing IDs/URLs as placeholders until full event data loads. Removed debug logging from bookmarkUtils as it served its purpose.
This commit is contained in:
@@ -128,9 +128,12 @@ export function groupIndividualBookmarks(items: IndividualBookmark[]) {
|
||||
}
|
||||
}
|
||||
|
||||
// Simple filter: only exclude bookmarks with empty/whitespace-only content
|
||||
// Simple filter: show bookmarks that have content OR just an ID (placeholder)
|
||||
export function hasContent(bookmark: IndividualBookmark): boolean {
|
||||
return !!(bookmark.content && bookmark.content.trim().length > 0)
|
||||
// Show if has content OR has an ID (placeholder until events are fetched)
|
||||
const hasValidContent = !!(bookmark.content && bookmark.content.trim().length > 0)
|
||||
const hasId = !!(bookmark.id && bookmark.id.trim().length > 0)
|
||||
return hasValidContent || hasId
|
||||
}
|
||||
|
||||
// Bookmark sets helpers (kind 30003)
|
||||
|
||||
Reference in New Issue
Block a user