fix(feed): key toNoteDisplayData on metadataState for reactive name updates
Root cause: toNoteDisplayData(localCache) wasn't keyed on metadataState,
so Compose could skip recomputing it when metadata arrived for items
that were composed before metadata was available (first ~2 items).
Fix: remember(event, metadataState) { event.toNoteDisplayData(localCache) }
ensures display data is recomputed when the note's metadata flow
invalidates. Applied to both regular and repost note paths.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -180,8 +180,9 @@ fun FeedNoteCard(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Original note content
|
// Original note content
|
||||||
|
val displayData = remember(originalEvent, metadataState) { originalEvent.toNoteDisplayData(localCache) }
|
||||||
NoteCard(
|
NoteCard(
|
||||||
note = originalEvent.toNoteDisplayData(localCache),
|
note = displayData,
|
||||||
localCache = localCache,
|
localCache = localCache,
|
||||||
onClick = { onNavigateToThread(originalEvent.id) },
|
onClick = { onNavigateToThread(originalEvent.id) },
|
||||||
onAuthorClick = onNavigateToProfile,
|
onAuthorClick = onNavigateToProfile,
|
||||||
@@ -228,8 +229,9 @@ fun FeedNoteCard(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
val displayData = remember(event, metadataState) { event.toNoteDisplayData(localCache) }
|
||||||
NoteCard(
|
NoteCard(
|
||||||
note = event.toNoteDisplayData(localCache),
|
note = displayData,
|
||||||
localCache = localCache,
|
localCache = localCache,
|
||||||
onClick = { onNavigateToThread(event.id) },
|
onClick = { onNavigateToThread(event.id) },
|
||||||
onAuthorClick = onNavigateToProfile,
|
onAuthorClick = onNavigateToProfile,
|
||||||
|
|||||||
Reference in New Issue
Block a user