Repository navigation
feat(chat): expose the listing and photos to the conversation screen - #367
Merged
Merged
Conversation
Mamel0uk
previously approved these changes
Nov 18, 2026
Mamel0uk
left a comment
Contributor
There was a problem hiding this comment.
lgtm, could you open an issue for the nitpick below?
Keeps both sides in ConversationViewModel and its test: the listing, role and photos of this branch, and main's photo messages. The stale-download test now builds its ViewModel through the viewModel() helper, which takes an optional listing repository, instead of calling the constructor by hand.
|
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.



Summary
Part of #305.
ConversationViewModelnow exposes what the rest of the conversation screen's Figma needs: the listing, whether I'm the renter, and the listing and profile photos. No UI yet. The screen that shows them is the next PR, stacked on this one.#305 is split in two to keep each review small: this PR (5 files, about +290/−30) and the screen PR, #368 (10 files, about +810/−95).
On its own, this PR downloads the two photos without showing them. #368 is the only user of the new fields, so please merge it right after this one.
What
ConversationUiState:listing: the observed listing. It is kept after a deletion and null if the listing was never read.isRenter.listingPhotoandotherUserPhoto.attempt {}moved fromInboxViewModeltochat/viewmodel/Attempt.kt, so both ViewModels use it. The code is unchanged.FakeProfileRepositorykeeps its users in aMutableStateFlow, soobserveProfileemits again when a test changes a profile. Its API is unchanged.Why
The screen should stay dumb. Downloading in the ViewModel keeps Firebase out of the UI, and puts the cancellation and stale-result rules where they can be tested.
Validation
./gradlew ktfmtCheck check assemble linton this branch: passed (1403 unit tests, 0 failures; no lint issue in the changed files).ConversationViewModelTestcases:AI use
Claude Code (Claude Opus 5.5) planned the change from the issue and the Figma. It implemented it and wrote the tests, then ran two adversarial reviews and applied their fixes. I reviewed and approved the plan and the split.
🤖 Generated with Claude Code