mirror of
https://github.com/dergigi/boris.git
synced 2025-12-17 22:54:30 +01:00
fix: resolve highlight loading issues for articles
- Add missing eventStore parameter to fetchHighlightsForArticle call - Clear highlights immediately when starting to load new article - Fix infinite loading spinners when articles have zero highlights - Ensure highlights are properly stored and persisted
This commit is contained in:
@@ -76,6 +76,10 @@ export function useArticleLoader({
|
||||
setSelectedUrl(`nostr:${naddr}`)
|
||||
setIsCollapsed(true)
|
||||
|
||||
// Clear highlights immediately when starting to load a new article
|
||||
setHighlights([])
|
||||
setHighlightsLoading(false) // Don't show loading yet
|
||||
|
||||
// If we have preview data from navigation, show it immediately (no skeleton!)
|
||||
if (previewData) {
|
||||
setReaderContent({
|
||||
@@ -251,7 +255,9 @@ export function useArticleLoader({
|
||||
return next.sort((a, b) => b.created_at - a.created_at)
|
||||
})
|
||||
},
|
||||
settingsRef.current
|
||||
settingsRef.current,
|
||||
false, // force
|
||||
eventStore || undefined
|
||||
)
|
||||
} else {
|
||||
// No article event to fetch highlights for - clear and don't show loading
|
||||
|
||||
Reference in New Issue
Block a user