diff --git a/lib/browser/app.js b/lib/browser/app.js index 531331f2..c8283ef2 100644 --- a/lib/browser/app.js +++ b/lib/browser/app.js @@ -88,8 +88,6 @@ app.controller('AppController', function( this.writer = ImageWriterService; this.scanner = DriveScannerService; - AnalyticsService.logEvent('Restart'); - NotifierService.subscribe($scope, 'image-writer:state', function(state) { AnalyticsService.log(`Progress: ${state.progress}% at ${state.speed} MB/s`); @@ -210,12 +208,19 @@ app.controller('NavigationController', function($state) { this.open = shell.openExternal; }); -app.controller('FinishController', function($state, SelectionStateService, SettingsService, ImageWriterService) { +app.controller('FinishController', function( + $state, + SelectionStateService, + SettingsService, + ImageWriterService, + AnalyticsService +) { this.settings = SettingsService.data; this.restart = function(options) { SelectionStateService.clear(options); ImageWriterService.resetState(); + AnalyticsService.logEvent('Restart', options); $state.go('main'); }; });