Repository navigation
feat(currency-info): show the community leader - #1164
Merged
Merged
Conversation
GetCommunity already returns the currency's leader, and Community.leader parses it, but CurrencyInfoViewModel read only topHolderChats. The view model now keeps the leader from the same call, and Currency Info shows a "Community Leader" section between Top Community Chats and About. - The section shows whenever there is a leader, with or without ranked chats. A leader with no display name counts as none. - The row uses the chat row's card, now shared as CommunityRowCard, with the leader's photo, name and @username. Tapping it opens their profile with a new UserProfileOrigin.communityLeader. A leader with no user id gets no chevron and isn't tappable. - The new origin follows .deeplink except arrivesFetched: GetCommunity's profile carries no bio, cover or join date, so the profile screen still fetches. - USDF no longer calls GetCommunity. It relied on the server failing. - CommunityFetching lets the tests drive the call through MockSession.
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.
GetCommunity already returns the currency's leader, and Community.leader
parses it, but CurrencyInfoViewModel read only topHolderChats. The view
model now keeps the leader from the same call, and Currency Info shows a
"Community Leader" section between Top Community Chats and About.
chats. A leader with no display name counts as none.
the leader's photo, name and @username. Tapping it opens their profile
with a new UserProfileOrigin.communityLeader. A leader with no user id
gets no chevron and isn't tappable.
profile carries no bio, cover or join date, so the profile screen still
fetches.
Spec test cases 1–4, 7 and 8 are covered by
CurrencyInfoViewModelCommunityLeaderTests.CommunityLeaderTextTestscovers the row text for cases 5 and 6 (subtitle without a username, label without "Opens profile."); the row not being tappable without a user id was checked by reading the code, not by a test. Design: Option A, node12992:57.