Merge pull request #557 from alteredworlds/learning_journey_update

Update docs/ArchitectureLearningJourney.md - Writing data
pull/578/head
Don Turner 2 years ago committed by GitHub
commit cb7deceec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -194,7 +194,7 @@ To write data, the repository provides suspend functions. It is up to the caller
_Example: Follow a topic_
Simply call `TopicsRepository.setFollowedTopicId` with the ID of the topic which the user wishes to follow.
Simply call `UserDataRepository.toggleFollowedTopicId` with the ID of the topic the user wishes to follow and `followed=true` to indicate that the topic should be followed (use `false` to unfollow a topic).
### Data sources
@ -309,7 +309,7 @@ User actions are communicated from UI elements to ViewModels using regular metho
**Example: Following a topic**
The `InterestsScreen` takes a lambda expression named `followTopic` which is supplied from `InterestsViewModel.followTopic`. Each time the user taps on a topic to follow this method is called. The ViewModel then processes this action by informing the topics repository.
The `InterestsScreen` takes a lambda expression named `followTopic` which is supplied from `InterestsViewModel.followTopic`. Each time the user taps on a topic to follow this method is called. The ViewModel then processes this action by informing the user data repository.
## Further reading

Loading…
Cancel
Save