Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting sample code snippet in Tutorial 5 #1108

Merged
merged 4 commits into from
Oct 25, 2023
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
6 changes: 2 additions & 4 deletions samples/tutorial/Tutorial5.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,11 @@ object WelcomeWorkflow : StatefulWorkflow<Unit, State, LoggedIn, WelcomeScreen>(
// ...

internal fun onNameChanged(name: String) = action {
state = state.copy(name = name)
state = state.copy(username = name)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like more needs to be changed here. This is still using name rather than username

Copy link
Contributor Author

@sssurvey sssurvey Sep 21, 2023

Choose a reason for hiding this comment

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

Yes @steve-the-edwards you are right, updated with username just now. I also forget to update line 323, it is now updated as well. Thanks!


internal fun onLogin() = action {
if (state.name.isNotEmpty()) {
setOutput(LoggedIn(state.name))
}
setOutput(LoggedIn(state.username))
}
}
```
Expand Down
Loading