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

[CIS-2264] Make sure to reload rows after moving them #2371

Merged
merged 2 commits into from Nov 14, 2022

Conversation

polqf
Copy link
Contributor

@polqf polqf commented Nov 11, 2022

🔗 Issue Links

https://stream-io.atlassian.net/browse/CIS-2264

📝 Summary

UIKit does not reload rows when they are moved. This is really bad for us because when we receive a .move update, it comes with changes to the cell itself. In most of the cases, because of other events, this is not an issue. But in edge cases, the cell stays with the old state until a new event comes in.

This PR ensures that whenever those .move events come, we always update the cell just in case.

🛠 Implementation

  • Unified logic for CollectionViewListChangeUpdater and TableViewListChangeUpdater so that we don't need to repeat the code around
  • Ensured cells are reloaded after a move

🧪 Manual Testing Notes

  1. Open the channel list
  2. Send A SINGLE message to a channel that is on screen, but it is not in the first position.

Expected result:

  • The channel should move to the first position
  • The cell should display an updated read indicator, and the typing indicator should be gone

Previous result:

  • The channel would move to the first position
  • BUT the cell was displaying old information, and the typing indicator was still there

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (docusaurus, tutorial, CMS)

🎁 Meme

UIKit does not reload rows when they are moved. This is really bad for us because when
we receive a .move update, it comes with changes to the cell itself. In most of the cases,
because of other events, this is not an issue. But in edge cases, the cell stays with the
old state until a new event comes in.

This PR ensures that whenever those .move events come, we always update the cell just in case.
@polqf polqf requested a review from a team as a code owner November 11, 2022 07:26
@github-actions
Copy link

github-actions bot commented Nov 11, 2022

1 Warning
⚠️ Please be sure to complete the Contributor Checklist in the Pull Request description

Generated by 🚫 Danger

@sonarcloud
Copy link

sonarcloud bot commented Nov 11, 2022

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

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

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

LGTM! ✅

@polqf polqf merged commit 83e1ccf into develop Nov 14, 2022
@polqf polqf deleted the bugfix/reload-rows-when-moving branch November 14, 2022 10:15
This was referenced Nov 15, 2022
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.

None yet

2 participants