From 1037905cbbbd5ce130f8e36cc0ba9e2a0cfccf1a Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Sun, 11 Sep 2016 10:26:09 -0700 Subject: [PATCH] fix(GUI): don't clear drive selection if clicking "Retry" (#696) If the user encounters a flash error, and then presses the "Retry" button, the drive selection is cleared, but then is re-selected right away because its probably the only available drive, leading to a very strange behaviour UX-wise. As a solution, we avoid clearing the drive selection. Change-Type: patch Changelog-Entry: Don't clear the drive selection if clicking the "Retry" button. Signed-off-by: Juan Cruz Viotti --- .../flash-error-modal/controllers/flash-error-modal.js | 5 ----- lib/gui/components/flash-error-modal/flash-error-modal.js | 1 - 2 files changed, 6 deletions(-) diff --git a/lib/gui/components/flash-error-modal/controllers/flash-error-modal.js b/lib/gui/components/flash-error-modal/controllers/flash-error-modal.js index 144e5862..a66decae 100644 --- a/lib/gui/components/flash-error-modal/controllers/flash-error-modal.js +++ b/lib/gui/components/flash-error-modal/controllers/flash-error-modal.js @@ -18,7 +18,6 @@ module.exports = function( $uibModalInstance, - SelectionStateModel, FlashStateModel, AnalyticsService, flashErrorData @@ -40,10 +39,6 @@ module.exports = function( * FlashErrorModalController.retry(); */ this.retry = () => { - SelectionStateModel.clear({ - preserveImage: true - }); - FlashStateModel.resetState(); AnalyticsService.logEvent('Restart after failure'); $uibModalInstance.dismiss(); diff --git a/lib/gui/components/flash-error-modal/flash-error-modal.js b/lib/gui/components/flash-error-modal/flash-error-modal.js index 6e7318ad..722b38d7 100644 --- a/lib/gui/components/flash-error-modal/flash-error-modal.js +++ b/lib/gui/components/flash-error-modal/flash-error-modal.js @@ -24,7 +24,6 @@ const angular = require('angular'); const MODULE_NAME = 'Etcher.Components.FlashErrorModal'; const FlashErrorModal = angular.module(MODULE_NAME, [ require('../modal/modal'), - require('../../models/selection-state'), require('../../models/flash-state'), require('../../modules/analytics') ]);