Skip to content

Commit 2844e65

Browse files
authored
Merge pull request #829 from sapuglha/fix_tutorial1
Fix tutorial 1 and 2
2 parents d60d895 + 044c87f commit 2844e65

File tree

4 files changed

+2
-3
lines changed

4 files changed

+2
-3
lines changed

samples/tutorial/Tutorial1.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ class TutorialViewModel(savedState: SavedStateHandle) : ViewModel() {
199199

200200
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`.
201201

202-
We can finally run the app again! It will look exactly the same as before, but now it is powered by our workflow.
203-
204202
## Driving the UI from Workflow State
205203

206204
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.

samples/tutorial/Tutorial2.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ object WelcomeWorkflow : StatefulWorkflow<Unit, State, Nothing, WelcomeScreen>()
258258
//
259259
}
260260
```
261+
261262
Remove the lambda at the end of `context.renderChild(WelcomeWorkflow)`
262263
The override for using `renderChild` on a child Workflow with `Nothing` as its output type does not have a lambda parameter
263264

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

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

-33.6 KB
Loading
-38.8 KB
Loading

0 commit comments

Comments
 (0)