Merge pull request #78 from resin-io/77-set-download-progress-to-0

Set download_progress to 0 when beginning download
This commit is contained in:
Pablo Carranza Vélez 2016-01-15 14:35:59 -03:00
commit b674c2991e

View File

@ -129,7 +129,7 @@ fetch = (app) ->
docker.getImage(app.imageId).inspectAsync()
.catch (error) ->
logSystemEvent(logTypes.downloadApp, app)
device.updateState(status: 'Downloading')
device.updateState(status: 'Downloading', download_progress: 0)
dockerUtils.fetchImageWithProgress app.imageId, (progress) ->
device.updateState(download_progress: progress.percentage)
.then ->