mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2025-01-03 15:47:52 +03:00
don't show progress widgets when using NFC
This commit is contained in:
parent
5a24f57e0b
commit
815150d113
@ -123,6 +123,12 @@ class _ResetDialogState extends ConsumerState<ResetDialog> {
|
|||||||
_application == Capability.fido2 &&
|
_application == Capability.fido2 &&
|
||||||
!ref.watch(rpcStateProvider.select((state) => state.isAdmin));
|
!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));
|
||||||
|
|
||||||
return ResponsiveDialog(
|
return ResponsiveDialog(
|
||||||
title: Text(l10n.s_factory_reset),
|
title: Text(l10n.s_factory_reset),
|
||||||
key: factoryResetCancel,
|
key: factoryResetCancel,
|
||||||
@ -323,10 +329,12 @@ class _ResetDialogState extends ConsumerState<ResetDialog> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
if (_resetting)
|
if (_resetting)
|
||||||
if (_application == Capability.fido2 && _currentStep >= 0) ...[
|
if (_application == Capability.fido2 &&
|
||||||
|
_currentStep >= 0 &&
|
||||||
|
showFidoResetProgress) ...[
|
||||||
Text('${l10n.s_status}: ${_getMessage()}'),
|
Text('${l10n.s_status}: ${_getMessage()}'),
|
||||||
LinearProgressIndicator(value: progress),
|
LinearProgressIndicator(value: progress),
|
||||||
] else
|
] else if (showFidoResetProgress)
|
||||||
const LinearProgressIndicator()
|
const LinearProgressIndicator()
|
||||||
]
|
]
|
||||||
.map((e) => Padding(
|
.map((e) => Padding(
|
||||||
|
Loading…
Reference in New Issue
Block a user