You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 25a93bb
Browse filesBrowse the repository at this point in the historyBrowse files
fix(mobile): align DM avatar and blank-name fallbacks with npub identity
PR-M1 review follow-up (#7493): both findings from the exact-head review.
## Summary
- dm_channel_labels.dart: dmAvatarInitial now mirrors
resolveDmChannelDisplayLabel's participant selection — the first
participant that is not the current user, falling back to the first
participant when every participant is the current user — instead of
blindly reading participants.first. Member order does not guarantee
the counterpart is listed first, so a [self, unnamedOther] DM rendered
the counterpart's compact npub label beside an avatar initial derived
from the current user's key. Both call sites (DM tile, DM header) pass
currentPubkey, so the avatar initial now identifies the same
counterpart the label names; unnamed counterparts keep the
hex-key-derived initial and named ones keep their authored initial.
- user_profile.dart: UserProfile.label trims the display name and falls
back to the compact npub when it is empty or whitespace-only,
mirroring `initial` (which already rejected blank names). Relay
profiles can carry a blank display_name through the cache unchanged,
which previously rendered an empty author label on every surface using
profile?.label.
- Regressions at the production seams: self-first [self, unnamedOther]
widget tests for the DM tile and DM header asserting that label and
avatar both identify the counterpart (each fails with the current
user's initial against the old first-participant selection), blank and
whitespace-only display-name scenarios in the pulse author-identity
table, and a UserProfile label/initial contract table.
Full suite: 2095 passing. flutter analyze clean, dart format clean.
Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <[email protected]>
0 commit comments