Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Sep 13, 2024
1 parent 815150d commit 5637d90
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/app/views/reset_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ class _ResetDialogState extends ConsumerState<ResetDialog> {
!ref.watch(rpcStateProvider.select((state) => state.isAdmin));

// show the progress widgets on desktop, or on Android when using USB
final showFidoResetProgress = !Platform.isAndroid ||
(Platform.isAndroid &&
(ref.read(currentDeviceProvider)?.transport == Transport.usb ||
_currentStep == _totalSteps));
final showResetProgress = _resetting &&
(!Platform.isAndroid ||
(Platform.isAndroid &&
(ref.read(currentDeviceProvider)?.transport == Transport.usb ||
_currentStep == _totalSteps)));

return ResponsiveDialog(
title: Text(l10n.s_factory_reset),
Expand Down Expand Up @@ -328,13 +329,11 @@ class _ResetDialogState extends ConsumerState<ResetDialog> {
},
),
],
if (_resetting)
if (_application == Capability.fido2 &&
_currentStep >= 0 &&
showFidoResetProgress) ...[
if (showResetProgress)
if (_application == Capability.fido2 && _currentStep >= 0) ...[
Text('${l10n.s_status}: ${_getMessage()}'),
LinearProgressIndicator(value: progress),
] else if (showFidoResetProgress)
] else
const LinearProgressIndicator()
]
.map((e) => Padding(
Expand Down

0 comments on commit 5637d90

Please sign in to comment.