Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Don't show progress widgets when using NFC #1689

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions lib/app/views/reset_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ class _ResetDialogState extends ConsumerState<ResetDialog> {
_application == Capability.fido2 &&
!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(
title: Text(l10n.s_factory_reset),
key: factoryResetCancel,
Expand Down Expand Up @@ -323,10 +329,12 @@ class _ResetDialogState extends ConsumerState<ResetDialog> {
),
],
if (_resetting)
if (_application == Capability.fido2 && _currentStep >= 0) ...[
if (_application == Capability.fido2 &&
_currentStep >= 0 &&
showFidoResetProgress) ...[
Text('${l10n.s_status}: ${_getMessage()}'),
LinearProgressIndicator(value: progress),
] else
] else if (showFidoResetProgress)
const LinearProgressIndicator()
]
.map((e) => Padding(
Expand Down
Loading