diff --git a/source/services/RunInstallerScriptService.as b/source/services/RunInstallerScriptService.as index ddc900a..0dbab86 100644 --- a/source/services/RunInstallerScriptService.as +++ b/source/services/RunInstallerScriptService.as @@ -43,6 +43,7 @@ package services private static const MISSING_SCRIPT_ERROR:String = "Installation of the Feathers SDK failed. Cannot find SDK installer script."; private static const UNKNOWN_ERROR:String = "Installation of the Feathers SDK failed due to an unexpected error."; + private static const DEFAULT_PROGRESS_LABEL:String = "Installing..."; private static const COPY_TASK_PROGRESS_LABEL:String = "Copying files..."; private static const GET_TASK_PROGRESS_LABEL:String = "Downloading file..."; private static const CHECKSUM_TASK_PROGRESS_LABEL:String = "Verifying checksum..."; @@ -201,12 +202,18 @@ package services private function ant_progressHandler(event:ProgressEvent):void { - var progressLabel:String = "Installing..."; + var progressLabel:String = DEFAULT_PROGRESS_LABEL; var progressValue:Number = Number.POSITIVE_INFINITY; var progressClass:Object = this._ant.progressClass; if(progressClass && event.bytesTotal !== 0) { progressValue = event.bytesLoaded / event.bytesTotal; + if(progressValue === 1) + { + //we're done with this task, we don't want to display + //progress anymore + progressValue = Number.POSITIVE_INFINITY; + } } if(progressValue < 1) { diff --git a/source/view/InstallProgressScreen.mxml b/source/view/InstallProgressScreen.mxml index 0b9ecd5..cf65e65 100644 --- a/source/view/InstallProgressScreen.mxml +++ b/source/view/InstallProgressScreen.mxml @@ -41,7 +41,7 @@ limitations under the License. import utils.CustomStyleNames; [Bindable] - public var progressValue:Number = 0; + public var progressValue:Number = Number.POSITIVE_INFINITY; [Bindable] public var progressText:String; diff --git a/source/view/mediators/InstallProgressScreenMediator.as b/source/view/mediators/InstallProgressScreenMediator.as index 751575e..feb21a9 100644 --- a/source/view/mediators/InstallProgressScreenMediator.as +++ b/source/view/mediators/InstallProgressScreenMediator.as @@ -46,7 +46,7 @@ package view.mediators override public function onRegister():void { this.updateTitle(); - this.screen.progressValue = 0; + this.screen.progressValue = Number.POSITIVE_INFINITY; this.screen.progressText = null; this.addContextListener(AcquireProductServiceEventType.START, context_acquireBinaryDistributionStartHandler); this.addContextListener(AcquireProductServiceEventType.PROGRESS, context_acquireBinaryDistributionProgressHandler);