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
merged 1 commit into from Nov 4, 2019
Merged

fixed downloader.onProgress call error #1919

merged 1 commit into from Nov 4, 2019

Conversation

zhefengzhang
Copy link
Contributor

@zhefengzhang zhefengzhang commented Nov 1, 2019

RE: cocos/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 wuzhiming left a comment

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

@zhefengzhang
Copy link
Contributor Author

@zhefengzhang zhefengzhang commented Nov 4, 2019

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

@holycanvas
Copy link
Contributor

@holycanvas holycanvas commented Nov 4, 2019

这个之后再优化吧

@holycanvas holycanvas merged commit e97848c into cocos:v2.2.1-release Nov 4, 2019
1 check passed
zhefengzhang added a commit to zhefengzhang/cocos2d-x-lite that referenced this issue Aug 24, 2020
@zhefengzhang zhefengzhang mentioned this pull request Aug 24, 2020
minggo pushed a commit that referenced this issue Aug 24, 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.

None yet

3 participants