minimize changes

This commit is contained in:
Adam Velebil 2022-09-09 12:55:56 +02:00
parent c7ea6bad53
commit 9e567b348c
No known key found for this signature in database
GPG Key ID: AC6D6B9D715FC084
2 changed files with 8 additions and 5 deletions

View File

@ -14,7 +14,8 @@ class ManagePasswordDialog extends ConsumerStatefulWidget {
const ManagePasswordDialog(this.path, this.state, {super.key});
@override
ConsumerState<ConsumerStatefulWidget> createState() => _ManagePasswordDialogState();
ConsumerState<ConsumerStatefulWidget> createState() =>
_ManagePasswordDialogState();
}
class _ManagePasswordDialogState extends ConsumerState<ManagePasswordDialog> {
@ -24,7 +25,9 @@ class _ManagePasswordDialogState extends ConsumerState<ManagePasswordDialog> {
bool _currentIsWrong = false;
_submit() async {
final result = await ref.read(oathStateProvider(widget.path).notifier).setPassword(_currentPassword, _newPassword);
final result = await ref
.read(oathStateProvider(widget.path).notifier)
.setPassword(_currentPassword, _newPassword);
if (result) {
if (!mounted) return;
Navigator.of(context).pop();

View File

@ -193,10 +193,10 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
final used = credentials?.length ?? 0;
final capacity = widget.oathState.version.isAtLeast(4) ? 32 : null;
return [
buildMenuItem(
title: Text(AppLocalizations.of(context)!.oath_add_account,
buildMenuItem(
title: Text(AppLocalizations.of(context)!.oath_add_account,
key: const Key('add oath account'),),
leading: const Icon(Icons.person_add_alt_1),
leading: const Icon(Icons.person_add_alt_1),
trailing: capacity != null ? '$used/$capacity' : null,
action: capacity == null || capacity > used
? () {