Use ReadonlyArrays in conversation model and redux
This commit is contained in:
parent
ecbf84638d
commit
dec23725e5
55 changed files with 173 additions and 162 deletions
|
@ -40,12 +40,12 @@ import {
|
|||
} from '../util/shouldNeverBeCalled';
|
||||
|
||||
export type DataPropsType = {
|
||||
attachments?: Array<AttachmentType>;
|
||||
attachments?: ReadonlyArray<AttachmentType>;
|
||||
candidateConversations: ReadonlyArray<ConversationType>;
|
||||
doForwardMessage: (
|
||||
selectedContacts: Array<string>,
|
||||
messageBody?: string,
|
||||
attachments?: Array<AttachmentType>,
|
||||
attachments?: ReadonlyArray<AttachmentType>,
|
||||
linkPreview?: LinkPreviewType
|
||||
) => void;
|
||||
getPreferredBadge: PreferredBadgeSelectorType;
|
||||
|
@ -102,7 +102,7 @@ export function ForwardMessageModal({
|
|||
filterAndSortConversationsByRecent(candidateConversations, '', regionCode)
|
||||
);
|
||||
const [attachmentsToForward, setAttachmentsToForward] = useState<
|
||||
Array<AttachmentType>
|
||||
ReadonlyArray<AttachmentType>
|
||||
>(attachments || []);
|
||||
const [isEditingMessage, setIsEditingMessage] = useState(false);
|
||||
const [messageBodyText, setMessageBodyText] = useState(messageBody || '');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue