Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: initial scroll to first unread message was broken when there more than 55 unread messages #2020

Merged
merged 9 commits into from
Mar 21, 2023

Conversation

santhoshvai
Copy link
Member

@santhoshvai santhoshvai commented Mar 20, 2023

🎯 Goal

While @khushal87 investigated #2004, he found that when there were large number of unread messages, the scroll to first unread was broken

🛠 Implementation details

The main fix is f35b448. This fixed a lot of issues

Demo

Simulator.Screen.Recording.-.iPhone.14.-.2023-03-20.at.19.03.41.mp4

🧪 Testing

  • Open sample app
  • Login as "vir"

Case 1

  • Load 7 unread messages - for i in {1..7}; do stream-cli chat send-message --user "25100e34-4450-3dcb-82eb-fbc34d2b421b" --channel-id "c1ece5ff-a5b1-4e4c-305c-4313fbc2e876" --channel-type "messaging" --text date +"%T"; done
  • open the channel, should highlight the unread message, but should NOT show the unread banner on top of the message
  • after 1 or 2 seconds the channel's unread count must become 0

Case 2

  • Go to homepage
  • Load 80 unread messages - for i in {1..80}; do stream-cli chat send-message --user "25100e34-4450-3dcb-82eb-fbc34d2b421b" --channel-id "c1ece5ff-a5b1-4e4c-305c-4313fbc2e876" --channel-type "messaging" --text date +"%T"; done
  • open the channel, should highlight the unread message, and SHOULD show the unread banner on top of the message
  • scroll to bottom
  • after 1 or 2 seconds the channel's unread count must become 0

And there should be no unnecessary blank list when this happens. This was a rerender issue before!

☑️ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

@sonarcloud
Copy link

sonarcloud bot commented Mar 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

51.4% 51.4% Coverage
0.0% 0.0% Duplication

@vanGalilea vanGalilea merged commit 76f9ee3 into develop Mar 21, 2023
@vanGalilea vanGalilea deleted the unread-fix-again branch March 21, 2023 09:08
@github-actions github-actions bot mentioned this pull request Mar 21, 2023
@stream-ci-bot
Copy link
Contributor

🎉 This PR is included in version 5.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants