Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion internal/quickstart/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ const (
defaultEnvKey = "test"
)

const (
_ = iota
stepCreateFlag
stepChooseSDK
stepShowSDKInstructions
stepToggleFlag
)

// ContainerModel is a high level container model that controls the nested models wher each
// represents a step in the quick-start flow.
type ContainerModel struct {
Expand Down Expand Up @@ -57,7 +65,7 @@ func (m ContainerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
cmd = tea.Quit
case key.Matches(msg, keys.Back):
// if showing SDK instructions, let the user go back to choose a different SDK
if m.currentStep == 3 {
if m.currentStep == stepShowSDKInstructions {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 is wrong. It should be 3 which is the show SDK instructions page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay the iotas were nice for this

m.currentStep -= 1
m.currentModel = NewChooseSDKModel(m.sdk.index)
cmd = m.currentModel.Init()
Expand Down