Fixes some low-hanging expensive renders in CVC. Namely:
- There are a few places where shadow paths can be trivially calculated.
Explicitly setting the shadow path saves an offscreen pass.
- Adopts CALayer corner masking where feasible (e.g. layers with
consistent corner radii).
- Fixes up content alignment issues from parallel changes to table view
styling.
- Re-adds view controller presentation within a nav controller (stemming
from parallel changes to table view styling)
- Fixes a bug around overzealous collision detection
Also fixes an unrelated issue. Setting up cv banners performs layout, which
can cause the conversation view controller's trait collection to change.
This can lead to us reenterantly setting up banners and updating trait
collection.
The workaround is to just call -ensureBannerState asynchronously from
-traitCollectionDidChange to break the synchronous chain.
- Now a struct, meaning no need for a clone() method
- Now a RandomAccessCollection indexed by Int
- Removed the subscript setter that EarlyMessageManager was using to
make the reordering behavior more explicit
- Generalized insert(key:value:isAppend:) to insert(key:at:value:)
- Added removeSubrange(_:)
The most significant change here is we defer initial loading of
collision interactions. We shouldn't block the main thread during
conversation presentation.
Instead, we'll perform it at UserInitiatedQoS. Once complete, we'll call
-ensureBannerState. Subsequent banner state updates will use the cached
interactions to find name collisions.
Instead of the delegate showing the share sheet for a tapped-on
attachment, let the CVComponentGenericAttachment do it itself. This
keeps the delegate from dealing with any specific component views
within the conversation.