From a66a331f2423f280dc268cce487e87b0070eef95 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 19 Dec 2022 12:08:34 +0200 Subject: [PATCH] Adjust setup wizard for Apple --- lib/ui/settings/settings_wizard.dart | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/ui/settings/settings_wizard.dart b/lib/ui/settings/settings_wizard.dart index cabb004f8..31aab7cfc 100644 --- a/lib/ui/settings/settings_wizard.dart +++ b/lib/ui/settings/settings_wizard.dart @@ -299,6 +299,14 @@ class _SettingsWizardState extends State { ], ); + var showNameFields = true; + if (state.companies.length > 1) { + showNameFields = false; + } + if (state.user.isConnectedToApple && state.user.fullName.isEmpty) { + showNameFields = false; + } + return AlertDialog( content: AppForm( focusNode: _focusNode, @@ -324,7 +332,7 @@ class _SettingsWizardState extends State { ), companyName, if (state.isHosted) subdomain, - if (state.companies.length == 1) ...[ + if (showNameFields) ...[ firstName, lastName, ], @@ -362,7 +370,7 @@ class _SettingsWizardState extends State { state.isHosted ? subdomain : darkMode), ], ), - if (state.companies.length == 1) + if (showNameFields) Row( children: [ Expanded(child: firstName),