mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-22 18:56:31 +00:00
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 <jviotti@openmailbox.org>
This commit is contained in:
parent
18cc0c5cd9
commit
1037905cbb
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
module.exports = function(
|
module.exports = function(
|
||||||
$uibModalInstance,
|
$uibModalInstance,
|
||||||
SelectionStateModel,
|
|
||||||
FlashStateModel,
|
FlashStateModel,
|
||||||
AnalyticsService,
|
AnalyticsService,
|
||||||
flashErrorData
|
flashErrorData
|
||||||
@ -40,10 +39,6 @@ module.exports = function(
|
|||||||
* FlashErrorModalController.retry();
|
* FlashErrorModalController.retry();
|
||||||
*/
|
*/
|
||||||
this.retry = () => {
|
this.retry = () => {
|
||||||
SelectionStateModel.clear({
|
|
||||||
preserveImage: true
|
|
||||||
});
|
|
||||||
|
|
||||||
FlashStateModel.resetState();
|
FlashStateModel.resetState();
|
||||||
AnalyticsService.logEvent('Restart after failure');
|
AnalyticsService.logEvent('Restart after failure');
|
||||||
$uibModalInstance.dismiss();
|
$uibModalInstance.dismiss();
|
||||||
|
@ -24,7 +24,6 @@ const angular = require('angular');
|
|||||||
const MODULE_NAME = 'Etcher.Components.FlashErrorModal';
|
const MODULE_NAME = 'Etcher.Components.FlashErrorModal';
|
||||||
const FlashErrorModal = angular.module(MODULE_NAME, [
|
const FlashErrorModal = angular.module(MODULE_NAME, [
|
||||||
require('../modal/modal'),
|
require('../modal/modal'),
|
||||||
require('../../models/selection-state'),
|
|
||||||
require('../../models/flash-state'),
|
require('../../models/flash-state'),
|
||||||
require('../../modules/analytics')
|
require('../../modules/analytics')
|
||||||
]);
|
]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user