Adjust setup wizard for Apple

This commit is contained in:
Hillel Coren 2022-12-19 12:08:34 +02:00
parent a84917a20b
commit a66a331f24
1 changed files with 10 additions and 2 deletions

View File

@ -299,6 +299,14 @@ class _SettingsWizardState extends State<SettingsWizard> {
], ],
); );
var showNameFields = true;
if (state.companies.length > 1) {
showNameFields = false;
}
if (state.user.isConnectedToApple && state.user.fullName.isEmpty) {
showNameFields = false;
}
return AlertDialog( return AlertDialog(
content: AppForm( content: AppForm(
focusNode: _focusNode, focusNode: _focusNode,
@ -324,7 +332,7 @@ class _SettingsWizardState extends State<SettingsWizard> {
), ),
companyName, companyName,
if (state.isHosted) subdomain, if (state.isHosted) subdomain,
if (state.companies.length == 1) ...[ if (showNameFields) ...[
firstName, firstName,
lastName, lastName,
], ],
@ -362,7 +370,7 @@ class _SettingsWizardState extends State<SettingsWizard> {
state.isHosted ? subdomain : darkMode), state.isHosted ? subdomain : darkMode),
], ],
), ),
if (state.companies.length == 1) if (showNameFields)
Row( Row(
children: [ children: [
Expanded(child: firstName), Expanded(child: firstName),