mirror of
https://github.com/dergigi/boris.git
synced 2025-12-17 06:34:24 +01:00
fix: don't show user highlights when viewing events on /e/ path
- Set selectedUrl and ReadableContent url to empty string for events - This prevents ThreePaneLayout from displaying user highlights for event views - Events should only show event-specific content, not global user highlights - Fixes issue where 422 highlights were always shown for all notes
This commit is contained in:
@@ -40,7 +40,7 @@ export function useEventLoader({
|
||||
.replace(/\n/g, '<br />')
|
||||
|
||||
const content: ReadableContent = {
|
||||
url: `nostr:${event.id}`,
|
||||
url: '', // Empty URL to prevent highlight display
|
||||
html: metaHtml + `<div style="white-space: pre-wrap; word-break: break-word;">${escapedContent}</div>`,
|
||||
title: `Note (${event.kind})`
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export function useEventLoader({
|
||||
displayEvent(cachedEvent)
|
||||
setReaderLoading(false)
|
||||
setIsCollapsed(false)
|
||||
setSelectedUrl(`nostr:${eventId}`)
|
||||
setSelectedUrl('') // Don't set nostr: URL to avoid showing highlights
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ export function useEventLoader({
|
||||
// Event not in cache, now set loading state and fetch from relays
|
||||
setReaderLoading(true)
|
||||
setReaderContent(undefined)
|
||||
setSelectedUrl(`nostr:${eventId}`)
|
||||
setSelectedUrl('') // Don't set nostr: URL to avoid showing highlights
|
||||
setIsCollapsed(false)
|
||||
|
||||
// Otherwise fetch from relays
|
||||
|
||||
Reference in New Issue
Block a user