From bd0b276ea54d2533713bd96d782f56528952f68a Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 17 Oct 2022 13:19:50 -0500 Subject: [PATCH] hub/sagas: fix scaling of download progress This was missed in 06b204dd53f96cd2712e78034e1e0ea4e28df00b. Fixes: https://github.com/pybricks/pybricks-code/issues/1219 --- src/hub/sagas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hub/sagas.ts b/src/hub/sagas.ts index 0df865b0..e3e0343d 100644 --- a/src/hub/sagas.ts +++ b/src/hub/sagas.ts @@ -242,7 +242,7 @@ function* handleDownloadAndRun(action: ReturnType): Gener } for (let i = 0; i < didCompile.file.size; i += chunkSize) { - yield* put(didProgressDownload((i * chunkSize) / didCompile.file.size)); + yield* put(didProgressDownload(i / didCompile.file.size)); const writeUserRamMessageId = nextMessageId();