Repository navigation
Conversation
bmc08gt
force-pushed
the
feat/profile-refresh-other-profile
branch
from
October 6, 2026 22:51
1f4e178 to
3d432f5
Compare
bmc08gt
added this pull request to stack #1696
October 7, 2026 01:28
bmc08gt
force-pushed
the
feat/profile-refresh-other-profile
branch
from
October 7, 2026 01:51
4514f75 to
ef4e127
Compare
bmc08gt
force-pushed
the
feat/profile-refresh-other-profile
branch
2 times, most recently
from
October 7, 2026 02:40
63c93af to
6a2ed9e
Compare
Adds BlockedUserDao.observeIsBlocked and exposes it through BlocklistCoordinator. blockUser now writes the local row so the flow flips on block as well as unblock.
…yment state ChatProfileViewModel now tracks the tip DM, block and mute state, the start-chatting fee, the E2EE flag and the pinned action, and can pay the fee to start a chat. The give-cash gate and the fee payment move out of ChatViewModel into StartChattingPayer so the chat and the profile share one copy. ChatInitPaymentSheet takes a sendComplete flow instead of the chat's event flow.
Another person's profile now uses the shared ProfileHeader, stats card and status chips. Mute, Report and Block move behind a frosted top-bar menu, and the Message and Send Cash shortcuts give way to one pinned button: Start Chatting, Open Chat or Unblock, with the E2EE footer above it. The start-chatting fee sheet is shown from the screen. Share offers Share Profile and Copy Link only. Screens can ask the root toast host for bottom clearance (ToastBottomClearance), so a toast rests above a pinned button instead of under it. joinedLabel moves to common-ui for both profile screens.
…state straight Paying the chat fee waited on the DM inside the event collector, so every other event stalled behind it for up to ten seconds, and a queued tap could pay the same person twice because the sheet's show and dismiss reset the only guard. The pay and the wait now run in their own coroutine, and a per-recipient paid marker (paidRecipients) that the sheet cannot clear gates payment and turns the pinned action into a loading Open Chat until the DM appears. The flow-shared view model is reused across people, so opening a different person now resets the join date, block, mute, encryption, DM, fee and sheet state, and ends the previous person's DM subscriptions. Opening the same person again keeps the settled profile while it refetches in the background, and a fetch that lands after the screen moved on is dropped. Also adds DefaultStartChattingPayer tests, lets the fee sheet animate out, and notes on ChatViewModel's duplicate pay path that it goes with the paid-DM gate.
Moves the other-user profile's pinned bottom area (optional line above, filled button, optional text action, nav-bar inset, height measurement, toast clearance) into ProfilePinnedActionBar so the group profile can reuse it.
The fee sheet now stays up, showing its success, until the DM's members arrive, and cannot be dismissed by swipe, scrim, back or DismissPaymentSheet while a payment is out. When the members land it hides and the chat opens. If they never do within 10s the sheet goes and the profile stays, as on iOS. A failed payment makes it dismissable again.
…ext colour Report and Block used the error colour; menus show destructive rows in errorText. The menu dropped below the ⋯ button; it now opens over it.
Each row gets the glyph iOS uses for it: a slashed bell for Mute, a speech bubble for Report, a no-entry sign for Block and a check circle for Unblock. Report and Block tint the icon in the error text colour with the label; Mute shows the plain bell once the chat is muted, since the row then unmutes.
iOS ProfileMenuItem.mute is always "Mute Notifications" with bell.slash, and the sheet it opens handles unmuting. The Android row flipped to "Unmute Notifications" and a plain bell once the chat was muted.
- The Muted chip reads "Muted until <time>" for a timed mute and goes when it lapses, through the chat screen's rememberMutedLabel. - Status chips sit 8 apart; the row keeps its 12 before Share. - The ⋯ menu puts a divider where the red rows start. - The pinned bar pads 12/8 with 8 between the footer and the button (10 on the 5dp grid).
bmc08gt
force-pushed
the
feat/profile-refresh-other-profile
branch
from
October 7, 2026 03:04
6a2ed9e to
1e4ba6b
Compare
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.
Third slice of the profile refresh, matching code-payments/code-ios-app#987: another user's profile is rebuilt on the shared header from #1691 and owns its own chat, block, fee and payment state. Stacked on #1691.
Screen (
features/messenger, Figma node 10990:494)ProfileHeaderandProfileStatsCard.ProfileShareSheetwithout the profile card row.ProfilePinnedActionBarinshared/common-ui/.../profile, so the group profile can pin its own button. It takes an optional slot above the button and an optional secondary text action below it.FloatingToastHostStategains a per-screen bottom clearance for that (ToastBottomClearance), taking the largest clearance any open screen asks for. The bar registers its own height while it is shown.State (
ChatProfileViewModel)BlocklistCoordinator.observeIsBlocked, and blocked wins over DM-exists because a block hides the DM without removing its members.blockUsernow writes the local blocklist row, so the chip and the button change without waiting for a sync.startChattingFee. When it is unknown the button opens the DM with Send Cash, as before; slice 5 replaces that path when the paid-DM gate leaves the chat.Paying to start a chat
StartChattingSheet) opens inside the profile rather than as a route, so the push to the new DM happens while the profile is still on top.ChatViewModelintoStartChattingPayer, which both screens use for their alerts.ChatViewModel's own fee payment still sends directly and goes away in slice 5.ChatInitPaymentSheetnow takes aFlow<Unit>for send completion instead ofChatViewModel's event flow, so the profile can use it.Tests
ProfileActionsTestcovers the pinned-action and menu decisions,DefaultStartChattingPayerTestthe balance, send-limit and no-account branches, andChatProfileViewModelTestrepeat opens, person switches, double payment and payment failures.BlockedUserDaoTestrunsobserveIsBlockedagainst Room.