You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.
Hi there could you please make the extractURL(...) method public?
This is really useful UX-wise to determine whether a URL WOULD be detected and do some logic against the previously-detected one and thus ONLY invoke a new preview(..) if the URL is different.
This happens when the user types in a text-field and you don't want to fire a new request upon every keystroke. Instead only want to do so when the detected URL has actually changed from the previous one. For example if they type a link in a comment text box and continue to type their message afterwards, the rest of the keystrokes will resolve to the same URL and thus you can skip the URL fetching.
NOTE: The only change required for this is to change the 'internal' keyword to 'public' in the SwiftLinkPreview extension's extractURL(text:) method.
Thx!
The text was updated successfully, but these errors were encountered:
Hi there could you please make the extractURL(...) method public?
This is really useful UX-wise to determine whether a URL WOULD be detected and do some logic against the previously-detected one and thus ONLY invoke a new preview(..) if the URL is different.
This happens when the user types in a text-field and you don't want to fire a new request upon every keystroke. Instead only want to do so when the detected URL has actually changed from the previous one. For example if they type a link in a comment text box and continue to type their message afterwards, the rest of the keystrokes will resolve to the same URL and thus you can skip the URL fetching.
NOTE: The only change required for this is to change the 'internal' keyword to 'public' in the SwiftLinkPreview extension's extractURL(text:) method.
Thx!
The text was updated successfully, but these errors were encountered: