Hydrate body ranges for story replies

This commit is contained in:
Fedor Indutny 2022-11-09 20:59:36 -08:00 committed by GitHub
parent 9f85db3fd8
commit be6e988a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 221 additions and 172 deletions

View file

@ -6,8 +6,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
import { get } from 'lodash';
import classNames from 'classnames';
import type {
BodyRangeType,
BodyRangesType,
DraftBodyRangesType,
LocalizerType,
ThemeType,
} from '../types/Util';
@ -116,7 +115,7 @@ export type OwnProps = Readonly<{
onSelectMediaQuality(isHQ: boolean): unknown;
onSendMessage(options: {
draftAttachments?: ReadonlyArray<AttachmentDraftType>;
mentions?: BodyRangesType;
mentions?: DraftBodyRangesType;
message?: string;
timestamp?: number;
voiceNoteAttachment?: InMemoryAttachmentDraftType;
@ -276,7 +275,7 @@ export const CompositionArea = ({
}, [inputApiRef, setLarge]);
const handleSubmit = useCallback(
(message: string, mentions: Array<BodyRangeType>, timestamp: number) => {
(message: string, mentions: DraftBodyRangesType, timestamp: number) => {
emojiButtonRef.current?.close();
onSendMessage({
draftAttachments,