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

fixed downloader.onProgress call error #1919

Merged

Conversation

@Jno1995
Copy link
Contributor

Jno1995 commented Nov 1, 2019

RE: cocos-creator/2d-tasks#2028 .
根据调试了代码调用上下文,len 的功能应该是 :the number of bytes to write. 也就是要写入的字节数。
image

image

而 len 是 onProgress 需要接受的参数 downloadBytes。
image
len 也是 nativeOnProgress 需要的 dl
image

在 native 上测试正常。

@holycanvas holycanvas changed the base branch from develop to v2.2.1-release Nov 1, 2019
@holycanvas holycanvas requested review from minggo and wuzhiming Nov 1, 2019
Copy link
Contributor

wuzhiming left a comment

看了上下文,感觉 downloadBytes 和 downloadNow 的命名有点不清楚,导致修改的时候参数顺序写错了,可以考虑把两个变量的命名修改一下

@Jno1995

This comment has been minimized.

Copy link
Contributor Author

Jno1995 commented Nov 4, 2019

我暂时没想到其它更好的命名

@holycanvas

This comment has been minimized.

Copy link
Contributor

holycanvas commented Nov 4, 2019

这个之后再优化吧

@holycanvas holycanvas merged commit e97848c into cocos-creator:v2.2.1-release Nov 4, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.