Skip to content

fix(tips): condense send button on open without the white pill flash - #1169

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/tip-chat-send-button-flash
Jul 28, 2026
Merged

fix(tips): condense send button on open without the white pill flash#1169
bmc08gt merged 1 commit into
code/cashfrom
fix/tip-chat-send-button-flash

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

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 ByChatId with a null participant, so SendCashButton read the chat as a normal DM → white expanded pill. When the tip profile resolved over the network, animateColorAsState eased white → transparent in view. That ease was the flash, on every tip-chat open.

Fix

  • ChatViewModel.State carries a real ChatType (UNKNOWNCONTACT_DM / TIP_DM) set from the fast local contact lookup at open, ahead of the network profile. Replaces the previously participant-derived chatType (which resolved just as late as the flash) — the derived extension is deleted, so there is one source of truth.
  • SendCashButton keys isTipChat/kindResolved off state.chatType, and snaps (not eases) its first color commit so the initial condense is invisible; only later typing toggles animate.
  • ChatBottomBar reveals only once chatType != 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.
  • ContactInfoContainer drops the tip-user pill indicator.

Also in this change: the condensed cash symbol uses textLarge and 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.

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.
@github-actions github-actions Bot added the type: fix Bug fix label Jul 28, 2026
@bmc08gt
bmc08gt merged commit d1cdbe2 into code/cash Jul 28, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/tip-chat-send-button-flash branch July 28, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant