• use SelectionIndicatorView in chat.
• modify SelectionIndicatorView to allow to configure ring color.
• improve legibility by using custom shade of gray for selection indicator in "not selected" state in chat when in light mode and with a wallpaper set.
• no longer omit bubble background for viewed "view once" messages.
• add a circular background for status icons - same as used by CVAttachmentProgressView.
• updated icon for "viewed" "view once" message.
Lottie doesn't play well with dynamic colors, capturing the value before UIKit applies proper traits to the view.
Mitigate this issue providing `forceDarkMode` flag for applicable uses (story viewer).
I changed `CVLinkPreviewView` and `CVComponentLinkPreview` to work with `LinkPreviewSent` instead of `LinkPreviewState` (a protocol) to simplify things. Turns out there are two more classes that adopt `LinkPreviewState` (group and call links), so that change was incorrect and this commit reverses it.
LinkPreviewView was previously used to show link previews in chat and in Share Extension when text being shared contained an url. This commit renames LinkPreviewView to CVLinkPreviewView and simplifies the component to only handle sent links - support for showing intermediate "loading" state as well as having a cancel button to remove link preview - has been removed from this class.
OutgoingLinkPreviewView is used to show "link preview draft" in the chat input toolbar. This commit renames the class to LinkPreviewView and adopts this component to be used in Share Extension in place of the component mentioned above.
All those changes result in update link preview UI in Share Extension - visible when sharing a website from Safari or other mobile browser.
CVAttachmentProgressView is the one that had to be updated the most since it displays "download" icon and download progress view, which now must have colors depending on type of the bubble (incoming vs outgoing) and whether or not there's a wallpaper in chat.
Other changes include font weight and size updates.