File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/Uno.Wasm.Bootstrap/ts/Uno/WebAssembly Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -284,14 +284,16 @@ namespace Uno.WebAssembly.Bootstrap {
284
284
285
285
// The totalResources value reported by .NET does not represent
286
286
// the actual total. To prevent progress bar from jumping
287
- // setting the max progress to 100 instead.
287
+ // setting the max progress to 100 instead and initially target 50
288
+ // When total number of resources increases, we always increase the target by half of the remainder to 100
289
+ // Usually the total grows several times, so ultimately the progress will appear as converging to completion.
288
290
if ( _previousTotalResources != totalResources )
289
291
{
290
292
this . _currentTargetProgress = this . _currentTargetProgress + ( 100 - this . _currentTargetProgress ) / 2 ;
291
293
this . _previousTotalResources = totalResources ;
292
294
}
293
295
294
- ( < any > this . progress ) . value = Math . min ( resourcesLoaded , this . _currentTargetProgress ) ;
296
+ this . progress . value = Math . min ( resourcesLoaded , this . _currentTargetProgress ) ;
295
297
}
296
298
297
299
private initProgress ( ) {
You can’t perform that action at this time.
0 commit comments