Skip to content

Commit

Permalink
Fix failed to connect radio dialog to use flowType
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-grace committed Nov 15, 2024
1 parent 576a891 commit 541e667
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/connection-stage-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,6 @@ export class ConnectionStageActions {
};
};

private handleConnectFail = () => {
this.setFlowStep(ConnectionFlowStep.ConnectFailed);
};

private onConnected = () => {
this.setFlowStep(ConnectionFlowStep.None);
this.dataCollectionMicrobitConnected();
Expand All @@ -242,7 +238,11 @@ export class ConnectionStageActions {
);
}
case ConnectionStatus.FailedToConnect: {
return this.handleConnectFail();
return this.setStage({
...this.stage,
flowType,
flowStep: ConnectionFlowStep.ConnectFailed,
});
}
case ConnectionStatus.FailedToReconnectTwice: {
return this.setStage({
Expand Down

0 comments on commit 541e667

Please sign in to comment.