Store: Show a rough speed indicator.

Some of the homebrew are a bit larger, it's nice to see a speed and not
just the progress bar.
This commit is contained in:
Unknown W. Brackets
2021-05-01 10:40:34 -07:00
parent 3379f33882
commit 2f08fb6583
7 changed files with 39 additions and 7 deletions

View File

@@ -423,11 +423,11 @@ int Client::ReadResponseEntity(net::Buffer *readbuf, const std::vector<std::stri
if (!contentLength) {
// No way to know how far along we are. Let's just not update the progress counter.
if (!readbuf->ReadAllWithProgress(sock(), contentLength, nullptr, progress->cancelled))
if (!readbuf->ReadAllWithProgress(sock(), contentLength, nullptr, &progress->kBps, progress->cancelled))
return -1;
} else {
// Let's read in chunks, updating progress between each.
if (!readbuf->ReadAllWithProgress(sock(), contentLength, &progress->progress, progress->cancelled))
if (!readbuf->ReadAllWithProgress(sock(), contentLength, &progress->progress, &progress->kBps, progress->cancelled))
return -1;
}