Commit Graph

13 Commits

Author SHA1 Message Date
Matthew Chen
c093739463 Port CVC to Swift. 2021-06-18 09:41:02 -03:00
Matthew Chen
fc003412cd Improve landing of loads. 2020-12-18 11:20:49 -03:00
Matthew Chen
11b80cb599 Modify layout to handle performBatchUpdates(). 2020-12-18 10:49:48 -03:00
Matthew Chen
8cfd6a4b36 Modify layout to handle performBatchUpdates(). 2020-12-18 10:49:48 -03:00
Matthew Chen
fe933c7cc3 Modify layout to handle performBatchUpdates(). 2020-12-18 10:49:48 -03:00
Matthew Chen
087144b4a5 Ensure layout validity before access. 2020-12-14 11:35:53 -03:00
Matthew Chen
111338b59d Rewrite conversation view. 2020-12-10 12:44:13 -03:00
Matthew Chen
7406a67870 Fix conversation view edge cases. 2020-08-11 17:35:07 -03:00
Michelle Linington
2bbdb14cdb Adopting some PR feedback:
- Remove explicit "self."
- Add comment going into detail about the UIKit behavior we're working
  around
- Remove force-unwrap from assert. It's safe, but eyebrow raising

Also fixed a minor bug I found:
percentOfIndexPathVisibleAboveBottom is explicitly checking "above the
bottom". Rect intersection is pretty, but if a single cell extended
above the top and bottom margins it would return an incorrect value.
I'm not sure if this is possible, but it's still incorrect.

Instead, this mostly reverts to the original behavior, comparing the top
of the cell frame with the bottom of the content frame. It leverages the
new function to compute the visibleContentRect to do so.
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
086a65ff7c Consolidate conversation scrolling logic 2020-06-19 11:54:31 -07:00
Nora Trapp
8b7772c7b8 Fall forward if there are no messages to fall back to when preserving scroll position 2020-06-18 16:25:04 -07:00
Nora Trapp
6105795cb3 PR Feedback 2020-06-18 16:25:04 -07:00