Skip to content

Commit

Permalink
Merge branch 'main' into rework-wording-in-notifications-drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Feb 26, 2025
2 parents 65fb5e3 + 11f1bc3 commit 5b87f73
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions apps/enmeshed/lib/profiles/profile/select_profile_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,24 @@ class _SelectProfileDialogState extends State<SelectProfileDialog> {

@override
Widget build(BuildContext context) {
if (_chooseExisting && widget.possibleAccounts.isNotEmpty) {
return _ChooseExistingProfile(
possibleAccounts: widget.possibleAccounts,
title: widget.title,
description: widget.description,
createNewProfilePressed: () => setState(() => _chooseExisting = false),
);
}

return CreateProfile(
onProfileCreated: (account) => context.pop(account),
onBackPressed: widget.possibleAccounts.isEmpty ? null : () => setState(() => _chooseExisting = true),
description: context.l10n.profiles_createNewForProcessingQrDescription,
isInDialog: true,
return Dialog(
child: AnimatedSize(
duration: const Duration(milliseconds: 200),
child:
_chooseExisting && widget.possibleAccounts.isNotEmpty
? _ChooseExistingProfile(
possibleAccounts: widget.possibleAccounts,
title: widget.title,
description: widget.description,
createNewProfilePressed: () => setState(() => _chooseExisting = false),
)
: CreateProfile(
onProfileCreated: (account) => context.pop(account),
onBackPressed: widget.possibleAccounts.isEmpty ? null : () => setState(() => _chooseExisting = true),
description: context.l10n.profiles_createNewForProcessingQrDescription,
isInDialog: true,
),
),
);
}
}
Expand Down

0 comments on commit 5b87f73

Please sign in to comment.