Skip to content

Commit

Permalink
Fix bug preventing returning to platform select page from package select
Browse files Browse the repository at this point in the history
  • Loading branch information
imclerran committed Jun 20, 2024
1 parent d6acf9d commit e23db8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/Controller.roc
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ packageSelectHandler = \model, action ->
if Model.menuIsFiltered model then
Step (Model.clearSearchFilter model)
else
type = Model.getHighlightedItem model |> \str -> if str == "App" then App else Pkg
type = when model.state is
PackageSelect { config } -> config.type
_ -> App
when type is
App -> Step (Model.toInputAppNameState model)
App -> Step (Model.toPlatformSelectState model)
Pkg -> Step (Model.toTypeSelectState model)

ClearFilter -> Step (Model.clearSearchFilter model)
Expand Down
8 changes: 0 additions & 8 deletions src/main.roc
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,7 @@ runCliApp = \type, fileName, platform, packages, forceUpdate ->
else
createRocFile! { fileName, platform, packages, type } repos
Stdout.line! "Created $(fileName).roc $(greenFg)$(resetStyle)"
# when type is
# App ->
# createRocFile! { fileName, platform, packages, type } repos
# Stdout.line! "Created $(fileName).roc $(greenFg)✔$(resetStyle)"
# Pkg ->
# createRocFile! { fileName, platform, packages, type } repos
# Stdout.line! "Created $(fileName).roc $(greenFg)✔$(resetStyle)"


## Run the TUI application.
## Load the repository data, run the main tui loop, and create the roc file when the user confirms their selections.
runTuiApp : Bool -> Task {} _
Expand Down

0 comments on commit e23db8a

Please sign in to comment.