Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PE-4885: use new downloader on share file page #1443

Merged
merged 6 commits into from
Oct 31, 2023

Conversation

thiagocarvalhodev
Copy link
Collaborator

@thiagocarvalhodev thiagocarvalhodev commented Oct 25, 2023

implement the new downloader on the shared page

--- Releases ---
Android release: https://appdistribution.firebase.google.com/testerapps/1:305132849030:android:6cf0cd5ec064fad3ffce07/releases/5mdd8e2u4dmc8

implement the new downloader on the shared page
@thiagocarvalhodev thiagocarvalhodev self-assigned this Oct 25, 2023
@github-actions
Copy link

github-actions bot commented Oct 25, 2023

Visit the preview URL for this PR (updated for commit 6a26d37):

https://ardrive-web--pr1443-pe-4885-use-new-down-ens4n8zn.web.app

(expires Tue, 07 Nov 2023 13:24:14 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a224ebaee2f0939e7665e7630e7d3d6cd7d0f8b0


if (fileKey != null && !isPinFile) {
final dataTx = await (_arweave.getTransactionDetails(revision.dataTxId!));
Copy link
Contributor

Choose a reason for hiding this comment

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

We weren't checking if the dataTxId was null before... Should we?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, the parentheses are unnecessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@matibat matibat left a comment

Choose a reason for hiding this comment

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

Left some comments.


if (fileKey != null && !isPinFile) {
final dataTx = await (_arweave.getTransactionDetails(revision.dataTxId!));
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, the parentheses are unnecessary.

} else {
dataBytes = dataRes.data;

cipher = dataTx.getTag(EntityTag.cipher);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: cipherTag may be a more appropriate name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

return;
}

logger.d('Download progress: $progress');
Copy link
Contributor

Choose a reason for hiding this comment

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

It's perhaps too spammy to have this log here on every progress update?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. 045ee86

fileSize: revision.size,
lastModifiedDate: revision.lastModifiedDate,
contentType:
revision.contentType ?? lookupMimeTypeWithDefaultType(revision.name),
Copy link
Contributor

Choose a reason for hiding this comment

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

We're using this expression many times, let's perhaps use a final var for it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Base automatically changed from PE-4864-unable-to-download-files-in-safari to PE-4754-address-code-review-comments-on-uploader-downloader-implementations October 26, 2023 16:29
Base automatically changed from PE-4754-address-code-review-comments-on-uploader-downloader-implementations to dev October 26, 2023 19:03
validated if the browser is safari on share file download
@thiagocarvalhodev thiagocarvalhodev merged commit ec29955 into dev Oct 31, 2023
@thiagocarvalhodev thiagocarvalhodev deleted the PE-4885-use-new-downloader-on-share-file-page branch October 31, 2023 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants