Hide message delivery status indicators when read events are disabled#6578
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
|
@CodeRabbit review |
✅ Action performedReview finished.
|
SDK Size Comparison 📏
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (7)
📝 WalkthroughWalkthroughChannel read and delivery event flags now flow from channel configuration into message item state and Compose and classic UI status indicators. Disabled event types suppress corresponding icons, with unit, Compose, mapping, and end-to-end coverage. ChangesEvent status visibility
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant ChannelConfig
participant MessageListController
participant MessageItem
participant StatusIndicator
ChannelConfig->>MessageListController: provide read and delivery event flags
MessageListController->>MessageItem: store event enablement
MessageItem->>StatusIndicator: pass flags with message status
StatusIndicator-->>MessageItem: render or hide corresponding icon
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/channels/MessageReadStatusIcon.kt`:
- Around line 104-108: Update the SyncStatus.COMPLETED branch in the message
read-status icon logic so read and delivered conditions also require their
corresponding events to be enabled. This must allow execution to fall through to
the next eligible indicator, including the sent icon when neither enabled
condition matches; preserve the existing icon helpers and status priority.
In
`@stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/channels/list/adapter/viewholder/internal/ChannelViewHolder.kt`:
- Around line 363-369: Update the status-indicator fallback logic in
ChannelViewHolder.kt lines 363-369 so disabled higher-state events fall through
to the next available indicator instead of returning null; preserve the existing
priority order. Apply the same logical && fallback pattern to the
SyncStatus.COMPLETED handling in FootnoteDecorator.kt lines 392-396.
🪄 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: ce758ed0-4ef7-412b-81c5-b8b121cfec21
📒 Files selected for processing (15)
stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageDeliveryStatusTests.ktstream-chat-android-compose/api/stream-chat-android-compose.apistream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/channels/MessageReadStatusIcon.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/channels/MessageReadStatusIconBehaviorTest.ktstream-chat-android-ui-common/api/stream-chat-android-ui-common.apistream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListController.ktstream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/state/messages/list/MessageListItemState.ktstream-chat-android-ui-common/src/test/kotlin/io/getstream/chat/android/ui/common/feature/messages/list/MessageListControllerTests.ktstream-chat-android-ui-components/api/stream-chat-android-ui-components.apistream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/channels/list/adapter/viewholder/internal/ChannelViewHolder.ktstream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/list/adapter/MessageListItem.ktstream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/feature/messages/list/adapter/viewholder/decorator/internal/FootnoteDecorator.ktstream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/utils/extensions/MessageListItem.ktstream-chat-android-ui-components/src/test/kotlin/io/getstream/chat/android/ui/utils/extensions/MessageListItemMappingTest.kt
💤 Files with no reviewable changes (1)
- stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/tests/MessageDeliveryStatusTests.kt
d59cdfe to
89fa1be
Compare
…s-indicators-are-shown-when-read
|



Goal
When a channel's config has
read_events: false, the message delivery status indicators (single and double checkmarks) should be hidden, in the message list and in the channel preview. The iOS SDK already hides them. Both our UI kits always showed the indicators.Resolves AND-1309
Implementation
The rule mirrors the iOS SDK:
channel.config.readEventsEnabledis true.channel.config.deliveryEventsEnabledis true.Compose kit:
MessageReadStatusIconapplies the rule in itsSyncStatus.COMPLETEDbranch, behind two new defaulted parameters (readEventsEnabled,deliveryEventsEnabled). The channel-based overload derives them fromchannel.config, which covers the channel list preview.MessageItemStatecarries the two flags to the message list footer.MessageListControllerfills them from the channel config, for both the channel and thread message lists.XML kit:
MessageListItem.MessageItemgets the same two flags, filled by the mapper from the commonMessageItemState.FootnoteDecorator(message list footnote) andChannelViewHolder(channel list preview) apply the same rule.All new fields and parameters have defaults that keep the current behavior, so the public API changes are additive.
🎨 UI Changes
No visual changes with the default channel config. When read events are disabled for the channel, the checkmarks below own messages and in the channel preview are no longer shown.
Testing
Manual steps:
Evidence:
@Ignoreannotations from the 7 e2e tests linked to AND-1309 inMessageDeliveryStatusTests. All 7 pass locally against the mock server, together with the previously passingtest_deliveryStatusShowsClocks_whenMessageIsInPendingStateAndReadEventsIsDisabled.MessageReadStatusIcon(Robolectric), config propagation inMessageListController, and the common-to-XML item mapping.spotlessCheck,detekt,apiDump, and the unit test suites of the touched modules pass locally.Note: e2e tests exist only for the Compose sample, so the XML kit is covered by the unit tests and the manual steps above.
Summary by CodeRabbit