Immediately parse pre-filled links in composer state (#6974)
* Immediately parse pre-filled links in composer state * Add hack to fix PasteInput height bug * Parse out ext links separately from post links
This commit is contained in:
@@ -257,6 +257,10 @@ export const TextInput = forwardRef(function TextInputImpl(
|
||||
minHeight: 60,
|
||||
includeFontPadding: false,
|
||||
},
|
||||
{
|
||||
borderWidth: 1,
|
||||
borderColor: 'transparent',
|
||||
},
|
||||
]}
|
||||
{...props}>
|
||||
{textDecorated}
|
||||
|
||||
@@ -6,7 +6,7 @@ export type LinkFacetMatch = {
|
||||
}
|
||||
|
||||
export function suggestLinkCardUri(
|
||||
mayBePaste: boolean,
|
||||
suggestLinkImmediately: boolean,
|
||||
nextDetectedUris: Map<string, LinkFacetMatch>,
|
||||
prevDetectedUris: Map<string, LinkFacetMatch>,
|
||||
pastSuggestedUris: Set<string>,
|
||||
@@ -20,8 +20,8 @@ export function suggestLinkCardUri(
|
||||
// Don't suggest already added or already dismissed link cards.
|
||||
continue
|
||||
}
|
||||
if (mayBePaste) {
|
||||
// Immediately add the pasted link without waiting to type more.
|
||||
if (suggestLinkImmediately) {
|
||||
// Immediately add the pasted or intent-prefilled link without waiting to type more.
|
||||
suggestedUris.add(uri)
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user