Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions samples/tutorial/Tutorial1.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ class TutorialViewModel(savedState: SavedStateHandle) : ViewModel() {

Now, we've created a `ViewRegistry` that consists of, so far, only our `WelcomeLayoutRunner`'s `ViewFactory`, and we're using it to set the content view of our activity. When the activity is started, it will start running the `WelcomeWorkflow`.

We can finally run the app again! It will look exactly the same as before, but now it is powered by our workflow.

## Driving the UI from Workflow State

Right now, the workflow isn't handling any of the events from the UI. Let's update it to be responsible for the login username as well as the action when the login button is pressed.
Expand Down
3 changes: 2 additions & 1 deletion samples/tutorial/Tutorial2.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ object WelcomeWorkflow : StatefulWorkflow<Unit, State, Nothing, WelcomeScreen>()
// …
}
```

Remove the lambda at the end of `context.renderChild(WelcomeWorkflow)`
The override for using `renderChild` on a child Workflow with `Nothing` as its output type does not have a lambda parameter

Expand All @@ -272,7 +273,7 @@ The override for using `renderChild` on a child Workflow with `Nothing` as its o
val welcomeScreen = context.renderChild(WelcomeWorkflow)
return welcomeScreen
}
```
```

Update the `TutorialActivity` to start at the `RootWorkflow` and we'll see the welcome screen again:

Expand Down
Binary file modified samples/tutorial/images/layout-runner-name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified samples/tutorial/images/workflow-name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.