Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/Attachments/AttachmentView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ function AttachmentView({
const encryptedSourceUrl = isAuthTokenRequired ? addEncryptedAuthTokenToURL(source) : source;

const onPDFLoadComplete = (path) => {
if (path && (transaction.transactionID || reportActionID)) {
CachedPDFPaths.add(transaction.transactionID || reportActionID, path);
const id = (transaction && transaction.transactionID) || reportActionID;
if (path && id) {
CachedPDFPaths.add(id, path);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tienifr just noticed this, since we should not be storing the path on web could we only add it on native?

@tienifr tienifr Feb 29, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CachePDFPath already has platform-dependent files (i.e. noop functions on web).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CachePDFPath already has platform-dependent files (i.e. noop functions on web).

Forgot about that 😆

}
if (!loadComplete) {
setLoadComplete(true);
Expand Down