Skip to content

Commit f0a5e49

Browse files
mollfprOSBotify
authored andcommitted
Merge pull request #60249 from software-mansion-labs/korytko/fix-video-send-attachment
[CP Staging] Fix issue with modal video player when sending attachments (cherry picked from commit bbe094e) (CP triggered by marcaaron)
1 parent 43ba7b0 commit f0a5e49

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/components/AttachmentModal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ type AttachmentModalProps = {
100100
/** The report that has this attachment */
101101
report?: OnyxEntry<OnyxTypes.Report>;
102102

103+
/** The ID of the current report */
104+
reportID?: string;
105+
103106
/** The type of the attachment */
104107
type?: ValueOf<typeof CONST.ATTACHMENT_TYPE>;
105108

@@ -162,6 +165,7 @@ function AttachmentModal({
162165
allowDownload = false,
163166
isTrackExpenseAction = false,
164167
report,
168+
reportID,
165169
onModalShow = () => {},
166170
onModalHide = () => {},
167171
onCarouselAttachmentChange = () => {},
@@ -623,7 +627,7 @@ function AttachmentModal({
623627
isUsedInAttachmentModal
624628
transactionID={transaction?.transactionID}
625629
isUploaded={!isEmptyObject(report)}
626-
reportID={!isEmptyObject(report) ? report.reportID : undefined}
630+
reportID={reportID ?? (!isEmptyObject(report) ? report.reportID : undefined)}
627631
/>
628632
</AttachmentCarouselPagerContext.Provider>
629633
)

src/pages/home/report/ReportActionCompose/ReportActionCompose.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ function ReportActionCompose({
418418
onModalShow={() => setIsAttachmentPreviewActive(true)}
419419
onModalHide={onAttachmentPreviewClose}
420420
shouldDisableSendButton={!!exceededMaxLength}
421+
reportID={reportID}
421422
>
422423
{({displayFileInModal}) => (
423424
<>

0 commit comments

Comments
 (0)