Skip to content

Commit aced7a9

Browse files
Don't render the flash-complete progress event as 0%
The connection library signals completion by calling the progress callback with an undefined value. Since the connection library v1.0.0-beta.0 upgrade (e6b4a7d) we rendered that as 0%, so the progress bar visibly jumped backwards while the dialog stayed open during post-flash reinit/reset (most noticeable after partial flash). Hold the bar at its last value until the dialog closes instead.
1 parent 4bdce37 commit aced7a9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/project/project-actions.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,9 @@ export class ProjectActions {
530530
const progress = (stage: ProgressStage, value?: number) => {
531531
const isPartial = stage === ProgressStage.PartialFlashing;
532532
const isFlashing = isPartial || stage === ProgressStage.FullFlashing;
533-
if (isFlashing) {
533+
// An undefined value for a flashing stage signals completion; hold the
534+
// bar at its last value until the dialog closes rather than showing 0.
535+
if (isFlashing && value !== undefined) {
534536
this.dialogs.progress({
535537
header: flashingCode,
536538
body: isPartial ? undefined : firstFlashNotice,

0 commit comments

Comments
 (0)