From c8f698be6131f11896a875edba2a5f6ad1298212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A1=E1=86=AB=E1=84=83=E1=85=A9=E1=86=BC?= =?UTF-8?q?=E1=84=92=E1=85=A7=E1=86=AB?= Date: Sun, 29 Jan 2023 18:00:28 +0900 Subject: [PATCH 1/3] Fix renamed class markdown in ArchitectureLearningJourney.md GetSaveableNewsResourcesUseCase -> GetUserNewsResourcesUseCase --- docs/ArchitectureLearningJourney.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/ArchitectureLearningJourney.md b/docs/ArchitectureLearningJourney.md index 7a6ab2d76..6c84344ea 100644 --- a/docs/ArchitectureLearningJourney.md +++ b/docs/ArchitectureLearningJourney.md @@ -70,7 +70,7 @@ Here's what's happening in each step. The easiest way to find the associated cod 2 - The ForYouViewModel calls GetSaveableNewsResourcesUseCase to obtain a stream of news resources with their bookmarked/saved state. No items will be emitted into this stream until both the user and news repositories emit an item. While waiting, the feed state is set to Loading. + The ForYouViewModel calls GetUserNewsResourcesUseCase to obtain a stream of news resources with their bookmarked/saved state. No items will be emitted into this stream until both the user and news repositories emit an item. While waiting, the feed state is set to Loading. Search for usages of NewsFeedUiState.Loading @@ -142,9 +142,9 @@ Here's what's happening in each step. The easiest way to find the associated cod 11 - GetSaveableNewsResourcesUseCase combines the list of news resources with the user data to emit a list of SaveableNewsResources. + GetUserNewsResourcesUseCase combines the list of news resources with the user data to emit a list of SaveableNewsResources. - GetSaveableNewsResourcesUseCase.invoke + GetUserNewsResourcesUseCase.invoke @@ -254,7 +254,7 @@ The [domain layer](https://developer.android.com/topic/architecture/domain-layer These use cases are used to simplify and remove duplicate logic from ViewModels. They typically combine and transform data from repositories. -For example, `GetSaveableNewsResourcesUseCase` combines a stream (implemented using `Flow`) of `NewsResource`s from a `NewsRepository` with a stream of `UserData` objects from a `UserDataRepository` to create a stream of `SaveableNewsResource`s. This stream is used by various ViewModels to display news resources on screen with their bookmarked state. +For example, `GetUserNewsResourcesUseCase` combines a stream (implemented using `Flow`) of `NewsResource`s from a `NewsRepository` with a stream of `UserData` objects from a `UserDataRepository` to create a stream of `SaveableNewsResource`s. This stream is used by various ViewModels to display news resources on screen with their bookmarked state. Notably, the domain layer in Now in Android _does not_ (for now) contain any use cases for event handling. Events are handled by the UI layer calling methods on repositories directly. From 8911fde6ad6347c34bfe6c4df2f2a737d51471a2 Mon Sep 17 00:00:00 2001 From: Don Turner Date: Mon, 30 Jan 2023 15:17:38 +0000 Subject: [PATCH 2/3] Update docs/ArchitectureLearningJourney.md --- docs/ArchitectureLearningJourney.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ArchitectureLearningJourney.md b/docs/ArchitectureLearningJourney.md index 6c84344ea..44c59dfad 100644 --- a/docs/ArchitectureLearningJourney.md +++ b/docs/ArchitectureLearningJourney.md @@ -142,7 +142,7 @@ Here's what's happening in each step. The easiest way to find the associated cod 11 - GetUserNewsResourcesUseCase combines the list of news resources with the user data to emit a list of SaveableNewsResources. + GetUserNewsResourcesUseCase combines the list of news resources with the user data to emit a list of UserNewsResources. GetUserNewsResourcesUseCase.invoke From a6d44055b72cbe7fa32bb3b4213478f8890c2c96 Mon Sep 17 00:00:00 2001 From: Don Turner Date: Mon, 30 Jan 2023 15:17:44 +0000 Subject: [PATCH 3/3] Update docs/ArchitectureLearningJourney.md --- docs/ArchitectureLearningJourney.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ArchitectureLearningJourney.md b/docs/ArchitectureLearningJourney.md index 44c59dfad..6b6fa4420 100644 --- a/docs/ArchitectureLearningJourney.md +++ b/docs/ArchitectureLearningJourney.md @@ -254,7 +254,7 @@ The [domain layer](https://developer.android.com/topic/architecture/domain-layer These use cases are used to simplify and remove duplicate logic from ViewModels. They typically combine and transform data from repositories. -For example, `GetUserNewsResourcesUseCase` combines a stream (implemented using `Flow`) of `NewsResource`s from a `NewsRepository` with a stream of `UserData` objects from a `UserDataRepository` to create a stream of `SaveableNewsResource`s. This stream is used by various ViewModels to display news resources on screen with their bookmarked state. +For example, `GetUserNewsResourcesUseCase` combines a stream (implemented using `Flow`) of `NewsResource`s from a `NewsRepository` with a stream of `UserData` objects from a `UserDataRepository` to create a stream of `UserNewsResource`s. This stream is used by various ViewModels to display news resources on screen with their bookmarked state. Notably, the domain layer in Now in Android _does not_ (for now) contain any use cases for event handling. Events are handled by the UI layer calling methods on repositories directly.