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

Http progress event fix #17

Merged
merged 3 commits into from
Sep 1, 2019
Merged

Http progress event fix #17

merged 3 commits into from
Sep 1, 2019

Conversation

borntocompile
Copy link
Contributor

  • onProgress now uses null propagation before invoking.
  • onProgress now invoke with the correct value as a parameter

* onProgress now uses null propagation before invoking.
* onProgress now invoke with the correct value as a parameter
@@ -125,8 +125,7 @@ private void UpdateProgress(ref float currentProgress, float progress, Action<fl
{
if (currentProgress < progress)
{
currentProgress = progress;
onProgress(downloadProgress);
onProgress?.Invoke(currentProgress = progress);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

With the assigning of currentProgress happening in the invocation does this mean it wont be assigned if onProgress event is null? if so then this would be incorrect functionality.

Moved the assigning of currentProgress out of the invokation of the onProgress event
@borntocompile borntocompile merged commit 345977d into development Sep 1, 2019
@kkjamie kkjamie mentioned this pull request Jan 2, 2020
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