Use ReadonlyArrays in conversation model and redux

This commit is contained in:
Fedor Indutny
2022-12-21 16:07:02 -08:00
committed by GitHub
parent ecbf84638d
commit dec23725e5
55 changed files with 173 additions and 162 deletions

View File

@@ -79,7 +79,7 @@ export type Props = Readonly<{
moduleClassName?: string;
theme: ThemeType;
placeholder?: string;
sortedGroupMembers?: Array<ConversationType>;
sortedGroupMembers?: ReadonlyArray<ConversationType>;
scrollerRef?: React.RefObject<HTMLDivElement>;
onDirtyChange?(dirty: boolean): unknown;
onEditorStateChange?(
@@ -488,7 +488,9 @@ export function CompositionInput(props: Props): React.ReactElement {
[]
);
const removeStaleMentions = (currentMembers: Array<ConversationType>) => {
const removeStaleMentions = (
currentMembers: ReadonlyArray<ConversationType>
) => {
const quill = quillRef.current;
if (quill === undefined) {