Skip to content

fix(messenger): stop the request deck crashing a chat on open - #1859

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/request-pill-intrinsics
Oct 26, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/request-pill-intrinsics

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Opening a group chat whose front payment request has a share for the viewer crashes the app on code/cash after #1851:

IllegalStateException: Asking for intrinsic measurements of SubcomposeLayout layouts is not supported.
  at ...RequestDeck.kt:734

The request pill sizes itself from its content's maxIntrinsicWidth, and the viewer status line under the title ("You owe $2 · 7 days left") drew through FirstThatFits, a SubcomposeLayout.

FirstThatFits is now a plain Layout that composes both lines, places the first one that fits, and reports the full line's width as its max intrinsic.

FirstThatFitsTest asks the line for its intrinsic width the way the pill does; on the old SubcomposeLayout it throws the same exception.

The deck's pill sizes itself from its content's maxIntrinsicWidth, and the
status line under the title drew through a SubcomposeLayout, which throws
when asked for intrinsics. Any group chat whose front request has a share
for the viewer crashed on open.

FirstThatFits is now a plain Layout that composes both lines and places
one, and reports the full line's width as its max intrinsic.
@bmc08gt bmc08gt self-assigned this Oct 26, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Oct 26, 2026
@bmc08gt
bmc08gt merged commit bd11442 into code/cash Oct 26, 2026
3 of 5 checks passed
@bmc08gt
bmc08gt deleted the fix/request-pill-intrinsics branch October 26, 2026 23:57
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