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 message list jumps #1148

Merged
merged 2 commits into from
Jun 4, 2021
Merged

Fix message list jumps #1148

merged 2 commits into from
Jun 4, 2021

Conversation

evsaev
Copy link
Contributor

@evsaev evsaev commented Jun 3, 2021

This PR fixes the issue when message list jumps if new message is sent OR if an old message is edited

no-jumps.mov

@evsaev evsaev added the 🪧 Demo App An Issue or PR related to the Demo App label Jun 3, 2021
@evsaev evsaev requested review from VojtaStavik and nuno-vieira June 3, 2021 17:26
@evsaev evsaev self-assigned this Jun 3, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2021

Codecov Report

Merging #1148 (af04d1e) into main (6c2aa2d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1148   +/-   ##
=======================================
  Coverage   91.36%   91.36%           
=======================================
  Files         216      216           
  Lines        9215     9215           
=======================================
  Hits         8419     8419           
  Misses        796      796           
Flag Coverage Δ
llc-tests 91.36% <ø> (ø)
llc-tests-ios12 91.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c2aa2d...af04d1e. Read the comment docs.

Copy link
Contributor

@VojtaStavik VojtaStavik left a comment

Choose a reason for hiding this comment

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

LGTM 👍

collectionView.contentSize.height > collectionView.bounds.height,
!didPerformInitialScrollToBottom {
let offset = CGPoint(x: 0, y: collectionViewContentSize.height - restore)
print("targetContentOffset(forProposedContentOffset) will restore \(offset)")
Copy link
Contributor

Choose a reason for hiding this comment

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

leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, removed it ✅

@evsaev evsaev force-pushed the message-list-jumps branch from 34c489f to 813879e Compare June 4, 2021 07:59
@evsaev evsaev merged commit d3aa3a2 into main Jun 4, 2021
@evsaev evsaev deleted the message-list-jumps branch June 4, 2021 08:25
@b-onc b-onc added 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK and removed 🪧 Demo App An Issue or PR related to the Demo App labels Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants