Fix broken state when going to settings in the success screen

This commit is contained in:
Juan Cruz Viotti 2016-03-10 17:15:57 -04:00
parent 61b88c95e0
commit dcdc7a18e2

View File

@ -93,6 +93,14 @@ app.controller('AppController', function(
this.writer = ImageWriterService;
this.scanner = DriveScannerService;
// This catches the case where the user enters
// the settings screen when a burn finished
// and goes back to the main screen with the back button.
if (!this.writer.isBurning()) {
this.selection.clear();
this.writer.resetState();
}
NotifierService.subscribe($scope, 'image-writer:state', function(state) {
AnalyticsService.log(`Progress: ${state.progress}% at ${state.speed} MB/s`);