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

@ -218,7 +218,7 @@ export type PropsData = {
isTargetedCounter?: number;
isSelected: boolean;
isSelectMode: boolean;
isSpoilerExpanded?: boolean;
isSpoilerExpanded?: Record<number, boolean>;
direction: DirectionType;
timestamp: number;
status?: MessageStatusType;
@ -324,7 +324,7 @@ export type PropsActions = {
pushPanelForConversation: PushPanelForConversationActionType;
retryMessageSend: (messageId: string) => unknown;
showContactModal: (contactId: string, conversationId?: string) => void;
showSpoiler: (messageId: string) => void;
showSpoiler: (messageId: string, data: Record<number, boolean>) => void;
kickOffAttachmentDownload: (options: {
attachment: AttachmentType;
@ -1803,7 +1803,7 @@ export class Message extends React.PureComponent<Props, State> {
displayLimit={displayLimit}
i18n={i18n}
id={id}
isSpoilerExpanded={isSpoilerExpanded || false}
isSpoilerExpanded={isSpoilerExpanded || {}}
kickOffBodyDownload={() => {
if (!textAttachment) {
return;
@ -1816,7 +1816,7 @@ export class Message extends React.PureComponent<Props, State> {
messageExpanded={messageExpanded}
showConversation={showConversation}
renderLocation={RenderLocation.Timeline}
onExpandSpoiler={() => showSpoiler(id)}
onExpandSpoiler={data => showSpoiler(id, data)}
text={contents || ''}
textAttachment={textAttachment}
/>