Commit Graph

61 Commits

Author SHA1 Message Date
Pete Walters
dc3a819024
Use backup thumbnails for link previews 2026-06-01 12:56:46 -05:00
Sasha Weiss
58a66af262
Remove the .animatedImage case from Attachment.ContentType 2026-05-08 16:58:23 -07:00
Sasha Weiss
c23eaa6bfc
Remove associated values from Attachment/ContentType
Co-authored-by: Pete Walters <pete@signal.org>
2026-04-30 09:16:49 -07:00
Sasha Weiss
a859dcb003
Make Attachment/ContentType associated values optional 2026-04-30 09:14:41 -07:00
Pete Walters
047e462825
Check link preview social graph image URLs 2026-04-23 08:42:11 -05:00
Max Radermacher
c3d11ad3d1
Remove WebP special cases & stillForWebPData 2026-03-16 17:48:52 -05:00
Igor Solomennikov
d3da4e132e
Clean up link preview UI a bit more. 2026-03-05 00:04:37 -06:00
Igor Solomennikov
ae989e63c7
Fix group links and call links not having a preview in chat.
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.
2026-03-02 13:18:30 -08:00
Max Radermacher
5f1e06b6d7
Use LinkPreviewCallLink for previews 2026-03-02 12:50:20 -06:00
Igor Solomennikov
37e1a99209
Big update of link preview views.
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.
2026-02-26 21:12:36 -08:00
Igor Solomennikov
b0d5885d65
Update appearance of link preview messages.
• now inset from bubble's edges
• updated background color
• updated description text color and size

Also includes quite a bunch of cleanup in LinkPreviewView.
2026-02-25 13:48:40 -08:00
Max Radermacher
7f0e73ab16
Run swiftformat . using v0.59.0 2026-01-28 14:16:20 -06:00
Max Radermacher
aaa207ee57
Use .mappedIfSafe for link previews & stickers 2026-01-12 10:08:52 -06:00
Max Radermacher
dbc312e03f
Use UInt64 for maxResponseSize 2026-01-09 18:21:42 -06:00
Max Radermacher
f810c2eea5
Clean up code for supported attachment types 2026-01-06 11:50:47 -06:00
Sasha Weiss
d267ec8305
Run swiftformat . 2025-12-30 11:34:05 -08:00
Max Radermacher
e4570abf33
Clean up some sticker methods 2025-12-19 14:59:08 -06:00
Igor Solomennikov
345ddca4d0
Initial round of iOS 26 appearance updates to chat input bar.
• new appearance for controls.
• new look for quoted message and link preview panels.
2025-10-23 19:45:31 -07:00
Sasha Weiss
30b6604d73
Modernize HTTPResponse 2025-10-23 16:02:01 -07:00
Max Radermacher
2bc550eddf
Add DataImageSource 2025-10-21 00:09:39 -05:00
Max Radermacher
28e28a44cf
Remove unused mimeType code 2025-10-20 20:13:38 -05:00
Max Radermacher
7f360307ec
Represent invalid ImageMetadata as nil 2025-10-20 20:11:57 -05:00
Max Radermacher
e25cc30c5a
Move mimeType & fileExtension to ImageFormat 2025-10-20 13:27:20 -05:00
Max Radermacher
47e536babb
Represent ImageFormat.unknown as nil 2025-10-20 13:26:51 -05:00
Pete Walters
1761235f88
Migrate from YYImage to SDWebImage 2025-09-10 21:39:41 -05:00
Harry
a72cc4ce92
Allow forwarding link previews even when fetching link previews is disabled 2025-06-26 15:46:37 -07:00
Jordan Rose
03b80c3594
Link previews for image URLs 2025-06-18 12:26:04 -07:00
Max Radermacher
0755f1878b
Remove side effects when fetching group links 2025-04-30 12:00:14 -05:00
Harry
e80785c72a
Fix link preview showing failed icon when downloading image 2025-04-14 14:32:38 -07:00
Max Radermacher
0a15c338e9
Fix race conditions in LinkPreviewFetchStateTest 2025-04-14 15:50:44 -05:00
Max Radermacher
10cb6f69f7
Use HttpHeaders in more places 2025-03-21 13:53:38 -05:00
Max Radermacher
8029e258f7
Rename OWSHttpHeaders → HttpHeaders 2025-03-21 13:52:25 -05:00
Max Radermacher
c2070943a5
Prefer infallible String → Data construct 2025-03-06 13:56:16 -06:00
Harry
8df602b184
Render most undownloadable attachments 2025-01-31 14:43:48 -08:00
Harry
2af0bb31dc
Remove TSResource/Stream/Pointer/Thumbnail, use v2 types directly instead 2024-12-04 13:29:06 -08:00
Max Radermacher
0d655f9e1a
Consolidate error handling for OWSURLSession 2024-11-04 15:49:11 -06:00
Max Radermacher
6d14b97ab6
Use new async OWSUrlSession methods 2024-11-04 15:29:53 -06:00
Harry
0c3c55ce32
Check for >0 timestamps for link previews 2024-10-22 15:06:09 -04:00
Harry
ce5689dcb3
Remove MockDB in favor of InMemoryDB 2024-10-07 19:06:08 -07:00
Ehren Kret
5ea36cd91b enable internal imports by default 2024-09-29 20:03:17 -05:00
Ehren Kret
f4b772a7f1 convert #file to #fileID by enabling concise magic file upcoming feature 2024-09-29 20:03:17 -05:00
Marissa Le Coz
279c42674c
Remove isCallLink from LinkPreviewState 2024-09-27 16:09:30 -04:00
Marissa Le Coz
a84400a4fe
Make call links icon into UIImage using UIGraphics 2024-09-26 16:57:38 -04:00
Max Radermacher
ac9bd24386
Update call link link previews to latest spec 2024-09-24 18:03:57 -05:00
Marissa Le Coz
752dffb2c1
Add image to call link previews for sent messages 2024-09-24 17:40:34 -04:00
Max Radermacher
4d9d555941
Clean up link preview rendering code 2024-08-01 12:21:48 -05:00
Max Radermacher
b9f49023ad
Send call link link previews 2024-07-26 22:00:54 -05:00
Max Radermacher
f2eb7f5a22
Extract LinkPreviewFetcher into its own type 2024-07-26 21:45:22 -05:00
Max Radermacher
82a87d6c9f
Asyncify LinkPreviewManager 2024-07-25 02:33:13 -05:00
Harry
bb083ca39c
Fold SignalCoreKit into SignalServiceKit
Co-authored-by: Adam Sharp <sharplet@signal.org>
2024-06-26 08:44:41 -07:00