fix(tips): condense send button on open without the white pill flash - #1169
Merged
Conversation
Tip DMs open via ByChatId with a null participant, so the send button read the chat as a normal DM and rendered the white expanded "Send $" pill, then eased white -> transparent once the tip profile resolved over the network — a visible flash on every tip-chat open. Resolve the chat kind from the fast local contact lookup instead of the network profile: carry a real ChatType on ChatViewModel.State (UNKNOWN -> CONTACT_DM / TIP_DM), set the moment the chat opens. The send button and bottom bar key off chatType, snap (not ease) the first color commit, and the bar only reveals once the kind is known — so a tip chat appears already condensed with no flash and no delay. Also: the condensed symbol uses textLarge and animates its size between states, and the tip-user indicator drops the pill.
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.
What
The tip-chat send button now appears already condensed (dark, symbol-only) the moment the chat opens — no more white expanded "Send $" pill flashing before it collapses.
Why it flashed
Tip DMs open via
ByChatIdwith anullparticipant, soSendCashButtonread the chat as a normal DM → white expanded pill. When the tip profile resolved over the network,animateColorAsStateeased white → transparent in view. That ease was the flash, on every tip-chat open.Fix
ChatViewModel.Statecarries a realChatType(UNKNOWN→CONTACT_DM/TIP_DM) set from the fast local contact lookup at open, ahead of the network profile. Replaces the previously participant-derivedchatType(which resolved just as late as the flash) — the derived extension is deleted, so there is one source of truth.SendCashButtonkeysisTipChat/kindResolvedoffstate.chatType, and snaps (not eases) its first color commit so the initial condense is invisible; only later typing toggles animate.ChatBottomBarreveals only oncechatType != UNKNOWN, so the bar appears already in its final presentation — no perceptible delay (local lookup, not the network), and a tip chat with unresolvable identity still falls through to the deactivated bar.ContactInfoContainerdrops the tip-user pill indicator.Also in this change: the condensed cash symbol uses
textLargeand animates its font size between the expanded/condensed states.Testing
:apps:flipcash:features:messenger:compileDebugKotlin— BUILD SUCCESSFUL. Visual verification of the tip-chat open (no flash, no delay) recommended on device.