Reset burn state in FinishController

This commit is contained in:
Juan Cruz Viotti 2016-03-10 12:05:28 -04:00
parent 793001e133
commit 9c5748b54e

View File

@ -90,10 +90,6 @@ app.controller('AppController', function(
AnalyticsService.logEvent('Restart');
if (!this.writer.isBurning()) {
this.writer.resetState();
}
NotifierService.subscribe($scope, 'image-writer:state', function(state) {
AnalyticsService.log(`Progress: ${state.progress}% at ${state.speed} MB/s`);
@ -214,11 +210,12 @@ app.controller('NavigationController', function($state) {
this.open = shell.openExternal;
});
app.controller('FinishController', function($state, SelectionStateService, SettingsService) {
app.controller('FinishController', function($state, SelectionStateService, SettingsService, ImageWriterService) {
this.settings = SettingsService.data;
this.restart = function(options) {
SelectionStateService.clear(options);
ImageWriterService.resetState();
$state.go('main');
};
});