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-6751: fixes autoupdate manifest payment selector #1890

Merged

Conversation

thiagocarvalhodev
Copy link
Collaborator

@thiagocarvalhodev thiagocarvalhodev commented Oct 10, 2024

  • automatically start the upload if all manifest are free to upload

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

- automatically start the upload if all manifest are free to upload
@thiagocarvalhodev thiagocarvalhodev self-assigned this Oct 10, 2024
Copy link

github-actions bot commented Oct 10, 2024

Visit the preview URL for this PR (updated for commit 0e62c9d):

https://ardrive-web--pr1890-pe-6751-fixes-autoup-sphth8df.web.app

(expires Tue, 22 Oct 2024 19:19:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a224ebaee2f0939e7665e7630e7d3d6cd7d0f8b0

@thiagocarvalhodev thiagocarvalhodev changed the base branch from PE-6751 to dev October 14, 2024 13:43
@thiagocarvalhodev thiagocarvalhodev changed the base branch from dev to PE-6751 October 15, 2024 14:02
Comment on lines 721 to 723
if (!isTest) {
await Future.delayed(const Duration(milliseconds: 100));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

whats up with this?

Comment on lines 822 to 823
await Future.delayed(const Duration(milliseconds: 100));

Copy link
Contributor

Choose a reason for hiding this comment

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

a pattern i see, hmmmmm

}
if (tasks.first is FileUploadTask) {
await _postUploadFile(
task: tasks.first as FileUploadTask,
Copy link
Contributor

Choose a reason for hiding this comment

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

Casting doesnt seem necessary here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is.

Dart’s type promotion has limitations:

  1. Local Variables Only: Type promotion works only with local variables, not with properties, getters, or index accesses. Since tasks.first is a property access (even if tasks is a local variable), type promotion doesn’t apply.
  2. Immutable Variables: The variable must not be mutated within the scope where the promotion is expected.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough - maybe could create a local variable with a typeguard - consider having a util for this that returns "FileUploadTask". But not a blocker.

@thiagocarvalhodev thiagocarvalhodev merged commit bb238fa into PE-6751 Oct 15, 2024
6 checks passed
@thiagocarvalhodev thiagocarvalhodev deleted the PE-6751-fixes-autoupdate-manifest-payment-selector branch October 15, 2024 20:03
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