Show muted icon on channel items for DMs with muted users#6302
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
31e5f31 to
cc34408
Compare
|
WalkthroughThe changes extend Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModelTest.kt`:
- Around line 196-256: Add a Paparazzi UI snapshot test that renders a 1:1
(direct) channel row with a muted user and verifies the inline mute indicator
using verifyPaparazziDebug; create a new test function (e.g. `fun
givenMutedDm_showsMutedIcon_paparazzi()`) in the Compose test suite, set up a
Paparazzi rule and theme, compose the channel row component under test (use the
same item state used in tests such as ItemState.ChannelItemState or the
ChannelRow/ChannelListItem composable that renders it) feeding it a direct
channel instance (like directChannel) and a mute state (like otherUserMute) so
the UI shows the mute icon, then call verifyPaparazziDebug to capture and assert
the snapshot; ensure the test file follows the repository naming conventions so
it is picked up by verifyPaparazziDebug.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f36b09eb-da1b-4c3d-b263-c9c403e5c04b
📒 Files selected for processing (2)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModel.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/channels/ChannelListViewModelTest.kt


Goal
In the channel list, we are currently displaying the muted icon only when the channel is muted. However, for direct messages, we should look at the muted users instead.
Implementation
Check user mutes to decide whether to show the muted icon on items representing direct messages channels
🎨 UI Changes
In the screenshots below, the sheet shows that the user is muted. The channel list lacks the icon in the "Before" screenshot
Testing
Mute a user and then check that the muted icon is shown on the corresponding direct message channel item
Summary by CodeRabbit
Release Notes
New Features
Tests