Skip to content

Conversation

@VelikovPetar
Copy link
Contributor

🎯 Goal

Fixes the visual glitch where sending new thread messages in short interval doesn't group them properly. (it groups them successfully only after receiving a WS event)

🛠 Implementation details

In the check for whether the footer should be shown (MessageFooterVisibility.shouldShowMessageFooter), compare the message.user by their ID instead of the full object.

🎨 UI Changes

Before After
before.mp4
after.mp4

🧪 Testing

  1. Open a thread
  2. Write multiple messages in under a minute
  3. The messages should be immediately grouped together, not only after couple of seconds

@github-actions
Copy link
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 3.23 MB 3.23 MB 0.00 MB 🟢
stream-chat-android-offline 3.45 MB 3.45 MB 0.00 MB 🟢
stream-chat-android-ui-components 10.54 MB 10.54 MB 0.00 MB 🟢
stream-chat-android-compose 12.76 MB 12.76 MB 0.00 MB 🟢

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
71.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@VelikovPetar VelikovPetar requested a review from Copilot October 28, 2025 20:15
@VelikovPetar VelikovPetar marked this pull request as ready for review October 28, 2025 20:15
@VelikovPetar VelikovPetar requested a review from a team as a code owner October 28, 2025 20:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where thread messages were not being grouped properly due to incorrect user comparison logic. The fix changes the user comparison from object equality to ID-based equality.

  • Changed user comparison from object equality to ID comparison in message footer visibility logic
  • Added comprehensive test coverage for all MessageFooterVisibility strategies
  • Updated changelog to document the bug fix

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
MessageFooterVisibility.kt Fixed user comparison to use user.id instead of comparing entire User objects
MessageFooterVisibilityTest.kt Added comprehensive test suite covering all footer visibility scenarios
CHANGELOG.md Documented the bug fix for thread message grouping

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants