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.
• define new shared color - "link" for both UIColor and Color.
• set default color (UIColor.Signal.link) for links in LinkingTextView.
• do not set "UIColor.clear" as underline color for links. just omitting underline style does the job.
This is the color of UI layer that dims content underneath when presenting something modally (eg action sheet).
Values were taken from UIDimmingView that UIKit uses to obscure content under modally presented view controller.
All views underwent similar changes:
• use dynamic colors instead of Theme. colors; as a result themeDidChange() is not longer needed.
• use system-provided layout margins for things like titles, subtitles and buttons.
• use standard "large primary", "large secondary" etc button styles instead of OWSButton and OWSFlatButton.
• use capsule shape for donation amount fields on iOS 26.
• make currency selection dropdown button a bit larger so that it looks better.
• other various layout code improvements.
1. Instead of overriding updateTableContents(shouldReload:) in every subclass let the base class to do the reloading and subclasses will just provide contents for the OWSTableViewController2.
2. Remove unnecessary rebuilding of the OWSTableViewContents in didLayoutSubviews(). Do not reload if content doesn't change (it does not in any of the subclasses).
3. Instead of keeping a pre-configured UIStackView in case there's footer content to show - keep a UIView which is more lightweight. Subclasses just add their own footer content to that.