Fix quoted reply rendering#65
Merged
viktorstrate merged 2 commits intoviktorstrate:mainfrom Mar 10, 2026
Merged
Conversation
EmbeddedEventDetails.ready has a senderProfile: ProfileDetails field that was being ignored. Use it to show the display name, falling back to the sender ID if the profile is pending or unavailable.
When a timeline item has a reply in .pending or .unavailable state, call timeline.loadReplyDetails() to fetch the content. Store the returned InReplyToDetails in an observed dictionary on LiveTimeline so SwiftUI re-renders without relying on the SDK to emit a .set diff. The view prefers the loaded details over the timeline item's own inReplyTo.event(), which may still report .pending/.unavailable until a diff arrives.
Owner
|
Looks good, thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Two fixes for quoted reply rendering:
1. Show display name instead of Matrix ID
EmbeddedEventDetails.readyincludes asenderProfile: ProfileDetailsfield that was being discarded with_. This meant the quoted reply header always showed the raw Matrix ID (e.g.@alice:matrix.org) instead of the display name shown elsewhere in the timeline.Fix: extract
displayNamefromsenderProfilewhen.ready, falling back to the sender ID if the profile is pending/unavailable.2. Load reply details that are pending or unavailable
When a room first loads, replies are often in
.pendingor.unavailablestate — the SDK has the event ID but hasn't fetched the content yet. Without explicitly callingloadReplyDetails, the grey placeholder boxes never resolve because the SDK doesn't always emit a timeline diff to trigger a re-render.Fix:
timeline.loadReplyDetails(eventIdStr:)InReplyToDetailsin an observed dictionary (loadedReplyDetails) onLiveTimelinerather than relying on a.setdiff from the SDKinReplyTo.event(), which may still report.pending/.unavailableuntil a diff arrives