Skip to content

fix(groups): keep the picture on the form through the success hold - #1507

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/group-picture-success-hold
Sep 20, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/group-picture-success-hold

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Creating a public group with a picture showed the tile crossfade back to the empty camera icon a beat before the flow left for the chat, so the pick read as dropped at the moment it was accepted.

The create's success path called discardPendingImage(), which deletes the re-encoded cache file and dispatches OnImageCleared. Navigation does not happen on that frame: dispatchSuccessThen holds the checkmark for 500ms before firing ChatCreated, and the form is on screen for all of it with its image state already reset. The tile is wrapped in a Crossfade, so the picture faded out rather than cutting.

PhotoSelectionViewModel, which this view model's own documentation says it mirrors, leaves the pick alone on success and lets onCleared() delete the file. CreateGroupViewModel had that same onCleared() override as well as the inline call, so dropping the inline call is enough. The shared view model clears when the flow entry pops, and leaving state.image populated is what lets that cleanup find the uri.

The failure paths that should drop the picture are untouched, since there the form stays on screen and the pick does have to go.

A regression test advances to the middle of the success hold and asserts that both the picture and its cache file are still there. It failed before the change with expected:<Uri(#65)> but was:<null>.

Creating a public group with a picture showed the tile crossfade back to the
empty camera icon a beat before the flow left for the chat, so the pick read as
dropped at the moment it was accepted.

The create's success path called discardPendingImage(), which deletes the
re-encoded cache file and dispatches OnImageCleared. Navigation does not happen
on that frame: dispatchSuccessThen holds the checkmark for 500ms before firing
ChatCreated, and the form is on screen for all of it with its image state
already reset.

PhotoSelectionViewModel, which this view model's own documentation says it
mirrors, leaves the pick alone on success and lets onCleared() delete the file.
CreateGroupViewModel had that same onCleared() override as well as the inline
call, so dropping the inline call is enough. The shared view model clears when
the flow entry pops, and leaving state.image populated is what lets that
cleanup find the uri.

The failure paths that should drop the picture are untouched, since there the
form stays on screen and the pick does have to go.
@bmc08gt bmc08gt self-assigned this Sep 20, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Sep 20, 2026
@bmc08gt
bmc08gt merged commit a285a95 into code/cash Sep 20, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/group-picture-success-hold branch September 23, 2026 16:45
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