Skip to content

Commit e48fe73

Browse files
wesbillmanBrain
andcommitted
Use promoted flow in community link error states
Co-authored-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@wes.communities.public.builderlabstaging.xyz> Signed-off-by: Wes <[email protected]>
1 parent 6834298 commit e48fe73

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎mobile/lib/features/pairing/pairing_page/community_link_form.dart‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class _CommunityLinkForm extends HookConsumerWidget {
3232
flow != null && ownsFlow && !flow.accountOnly && flow.problem != null;
3333

3434
void submit() {
35-
if (busy || (failed && flow?.canRetry != true)) return;
35+
if (busy || (failed && !flow.canRetry)) return;
3636
final create = onCreate;
3737
if (create != null) {
3838
final name = controller.text.trim().toLowerCase();
@@ -90,7 +90,7 @@ class _CommunityLinkForm extends HookConsumerWidget {
9090
hintStyle: TextStyle(color: context._onboardingMutedInk),
9191
errorText:
9292
error.value ??
93-
(failed ? hostedFlowProblemMessage(flow?.problem) : null),
93+
(failed ? hostedFlowProblemMessage(flow.problem) : null),
9494
filled: true,
9595
fillColor: context._onboardingInputSurface,
9696
enabledBorder: context._inputBorder,
@@ -100,14 +100,14 @@ class _CommunityLinkForm extends HookConsumerWidget {
100100
),
101101
onChanged: (_) {
102102
error.value = null;
103-
if (failed) unawaited(flow?.leave());
103+
if (failed) unawaited(flow.leave());
104104
},
105105
onSubmitted: (_) => submit(),
106106
),
107107
const SizedBox(height: Grid.xs),
108108
FilledButton(
109109
style: context._onboardingGlassButtonStyle,
110-
onPressed: busy || (failed && flow?.canRetry != true) ? null : submit,
110+
onPressed: busy || (failed && !flow.canRetry) ? null : submit,
111111
child: Text(busy ? 'Connecting…' : 'Continue'),
112112
),
113113
const SizedBox(height: Grid.xxs),

0 commit comments

Comments
 (0)