mirror of
https://github.com/dergigi/boris.git
synced 2025-12-19 07:34:28 +01:00
fix: manually set highlight properties after eventToHighlight
- Set publishedRelays, isLocalOnly, and isSyncing directly on highlight object - This bypasses the __highlightProps mechanism which wasn't working - Add logging to verify properties are set correctly - This should finally fix the airplane icon not showing in flight mode
This commit is contained in:
@@ -213,14 +213,22 @@ export async function createHighlight(
|
||||
markEventAsOfflineCreated(signedEvent.id)
|
||||
}
|
||||
|
||||
// Convert to Highlight with relay tracking info and return IMMEDIATELY
|
||||
console.log('🔄 [HIGHLIGHT-CREATION] About to convert event to highlight:', {
|
||||
eventId: signedEvent.id,
|
||||
hasHighlightProps: !!(signedEvent as any).__highlightProps,
|
||||
highlightProps: (signedEvent as any).__highlightProps
|
||||
})
|
||||
|
||||
// Convert to Highlight with relay tracking info
|
||||
const highlight = eventToHighlight(signedEvent)
|
||||
|
||||
// Manually set the properties since __highlightProps might not be working
|
||||
highlight.publishedRelays = publishResponses
|
||||
.filter(response => response.ok)
|
||||
.map(response => response.from)
|
||||
highlight.isLocalOnly = isLocalOnly
|
||||
highlight.isSyncing = false
|
||||
|
||||
console.log('🔄 [HIGHLIGHT-CREATION] Final highlight properties set:', {
|
||||
eventId: signedEvent.id,
|
||||
publishedRelays: highlight.publishedRelays,
|
||||
isLocalOnly: highlight.isLocalOnly,
|
||||
isSyncing: highlight.isSyncing
|
||||
})
|
||||
|
||||
return highlight
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user