Modern profile sharing in 1:1 and GroupV1 groups

This commit is contained in:
Scott Nonnenberg 2020-10-16 11:31:57 -07:00
parent 60f2422e2a
commit 04b7a29229
22 changed files with 371 additions and 115 deletions

View file

@ -137,6 +137,7 @@ export type PropsData = {
deletedForEveryone?: boolean;
canReply: boolean;
canDownload: boolean;
canDeleteForEveryone: boolean;
bodyRanges?: BodyRangesType;
};
@ -1159,6 +1160,7 @@ export class Message extends React.PureComponent<Props, State> {
): JSX.Element | null {
const {
attachments,
canDownload,
canReply,
direction,
disableMenu,
@ -1294,7 +1296,7 @@ export class Message extends React.PureComponent<Props, State> {
)}
>
{canReply ? reactButton : null}
{canReply ? downloadButton : null}
{canDownload ? downloadButton : null}
{canReply ? replyButton : null}
{menuButton}
</div>
@ -1328,6 +1330,7 @@ export class Message extends React.PureComponent<Props, State> {
public renderContextMenu(triggerId: string): JSX.Element {
const {
attachments,
canDownload,
canReply,
deleteMessage,
deleteMessageForEveryone,
@ -1349,7 +1352,8 @@ export class Message extends React.PureComponent<Props, State> {
const menu = (
<ContextMenu id={triggerId}>
{!isSticker &&
{canDownload &&
!isSticker &&
!multipleAttachments &&
!isTapToView &&
attachments &&