Allow copy/paste of formatting and mentions

This commit is contained in:
Scott Nonnenberg 2023-05-09 17:40:19 -07:00 committed by GitHub
parent 320ac044a8
commit b4caf67bf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 1003 additions and 446 deletions

View file

@ -3,6 +3,7 @@
import type { FunctionComponent, ReactNode } from 'react';
import React, { useCallback } from 'react';
import { noop } from 'lodash';
import { ContactName } from '../conversation/ContactName';
@ -21,6 +22,8 @@ import {
RenderLocation,
} from '../conversation/MessageTextRenderer';
const EMPTY_OBJECT = Object.freeze(Object.create(null));
export type PropsDataType = {
isSelected?: boolean;
isSearchingInConversation?: boolean;
@ -166,8 +169,8 @@ export const MessageSearchResult: FunctionComponent<PropsType> = React.memo(
disableLinks
emojiSizeClass={undefined}
i18n={i18n}
isSpoilerExpanded={false}
onMentionTrigger={() => null}
isSpoilerExpanded={EMPTY_OBJECT}
onMentionTrigger={noop}
renderLocation={RenderLocation.SearchResult}
textLength={cleanedSnippet.length}
/>