Commit Graph

8 Commits

Author SHA1 Message Date
Nora Trapp
416ae1e9ef Add some benches and make a small dent on conversation open time 2020-08-20 09:26:41 -07:00
Michelle Linington
c9e1b3dedb Fix compilation failure due to rebase
s/lastSortId/lastSortIdInLoadedWindow
2020-07-01 09:41:31 -07:00
Michelle Linington
753aabb829 IOS-605: ScrollDownButton continues to remain visible after jumping to bottom
This fixes a bug where the ScrollDownButton would continue to persist
even after jumping to the bottom.

This is due to undefined ordering in UIKit with how it handles
scrollViewDidScroll: and updating the collectionView's visible index
paths. We'd receive the final scrollViewDidScroll: before the visible
items were updated.

To fix this, we need to figure out what cell's are visible without
relying on UICollectionView's cell appearance to be up to date. This
instead uses the collection view layout's cell frames to determine if
they live in the visible content rect of the collection view. Since
layout must be available for the cell to be visible, this should be
correct.

Made some other minor changes around naming. Clarified that lastSortId
and lastIndexPath refer to the viewmodel's loaded window, not the
global thread state.
2020-07-01 09:41:31 -07:00
Nora Trapp
5b102b9b5a Fix scroll to typing indicators 2020-06-25 19:05:09 -03:00
Michelle Linington
22926a5bff IOS-604: Stale index path used in -[ConversationViewController scrollToBottomAnimated:]
Our target index path should be determined after updating the
ConversationViewModel's window.

A more robust solution might involve pinning the bottom page to *always*
be loaded in the ConversationViewModel. But for now, this should fix the
assertion.
2020-06-25 10:35:27 -07:00
Nora Trapp
6577b6906e Always scroll focus message / unread marker as close to top as possible 2020-06-23 20:34:08 -07:00
Nora Trapp
a162c779b3 Fix scroll to top logic 2020-06-23 20:34:08 -07:00
Nora Trapp
086a65ff7c Consolidate conversation scrolling logic 2020-06-19 11:54:31 -07:00