File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -473,6 +473,8 @@ export class Viewer {
473473 let loadingTaskId = null ;
474474 if ( showLoadingUI ) loadingTaskId = this . loadingSpinner . addTask ( 'Downloading...' ) ;
475475
476+ let downloadDone = false ;
477+
476478 let loadedPercent = 0 ;
477479 const onProgress = ( percent , percentLabel , loaderStatus ) => {
478480 loadedPercent = percent ;
@@ -506,12 +508,16 @@ export class Viewer {
506508 if ( firstBuild && streamBuildSections || finalBuild && ! streamBuildSections ) {
507509 this . runAfterFirstSort . push ( ( ) => {
508510 this . loadingSpinner . removeTask ( loadingTaskId ) ;
509- if ( ! finalBuild ) this . loadingProgressBar . show ( ) ;
511+ if ( ! finalBuild && ! downloadDone ) this . loadingProgressBar . show ( ) ;
510512 } ) ;
511513 }
512514 if ( streamBuildSections ) {
513- if ( finalBuild ) this . loadingProgressBar . hide ( ) ;
514- else this . loadingProgressBar . setProgress ( loadedPercent ) ;
515+ if ( finalBuild ) {
516+ downloadDone = true ;
517+ this . loadingProgressBar . hide ( ) ;
518+ } else {
519+ this . loadingProgressBar . setProgress ( loadedPercent ) ;
520+ }
515521 }
516522 }
517523 } ) ;
You can’t perform that action at this time.
0 commit comments