Preload conversation open data

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
Fedor Indutny 2024-08-21 18:48:29 -07:00 committed by GitHub
parent 6ea47d9c6b
commit 7db33a6708
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 332 additions and 89 deletions

View file

@ -74,6 +74,7 @@ type PropsHousekeeping = {
buttonAriaLabel?: string;
i18n: LocalizerType;
onClick: (id: string) => void;
onMouseDown: (id: string) => void;
theme: ThemeType;
};
@ -98,6 +99,7 @@ export const ConversationListItem: FunctionComponent<Props> = React.memo(
markedUnread,
muteExpiresAt,
onClick,
onMouseDown,
phoneNumber,
profileName,
removalStage,
@ -202,6 +204,10 @@ export const ConversationListItem: FunctionComponent<Props> = React.memo(
}
const onClickItem = useCallback(() => onClick(id), [onClick, id]);
const onMouseDownItem = useCallback(
() => onMouseDown(id),
[onMouseDown, id]
);
return (
<BaseConversationListItem
@ -223,6 +229,7 @@ export const ConversationListItem: FunctionComponent<Props> = React.memo(
messageText={messageText}
messageTextIsAlwaysFullSize
onClick={onClickItem}
onMouseDown={onMouseDownItem}
phoneNumber={phoneNumber}
profileName={profileName}
sharedGroupNames={sharedGroupNames}