-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ change the return type of feed repository
- Loading branch information
Showing
13 changed files
with
90 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
android/app/src/main/java/net/pengcook/android/data/repository/DummyFeedsRepository.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
android/app/src/main/java/net/pengcook/android/data/repository/feed/FeedRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
package net.pengcook.android.data.repository.feed | ||
|
||
import net.pengcook.android.presentation.core.model.Feed | ||
import net.pengcook.android.presentation.core.model.Recipe | ||
import net.pengcook.android.presentation.detail.RecipeStep | ||
|
||
interface FeedRepository { | ||
suspend fun fetchRecipes( | ||
pageNumber: Int, | ||
pageSize: Int, | ||
): Result<List<Feed>> | ||
): Result<List<Recipe>> | ||
|
||
suspend fun fetchRecipeSteps(recipeId: Long): Result<List<RecipeStep>> | ||
|
||
suspend fun fetchRecipesByCategory( | ||
pageNumber: Int, | ||
pageSize: Int, | ||
category: String, | ||
): Result<List<Feed>> | ||
): Result<List<Recipe>> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
android/app/src/main/java/net/pengcook/android/presentation/core/model/Feed.kt
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
android/app/src/main/java/net/pengcook/android/presentation/core/model/Ingredient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package net.pengcook.android.presentation.core.model | ||
|
||
import android.os.Parcelable | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
data class Ingredient( | ||
val ingredientId: Long, | ||
val ingredientName: String, | ||
val requirement: String, | ||
) : Parcelable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...pp/src/main/java/net/pengcook/android/presentation/home/listener/FeedItemEventListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package net.pengcook.android.presentation.home.listener | ||
|
||
import net.pengcook.android.presentation.core.model.Feed | ||
import net.pengcook.android.presentation.core.model.Recipe | ||
|
||
interface FeedItemEventListener { | ||
fun onNavigateToDetail(feedInfo: Feed) | ||
fun onNavigateToDetail(recipe: Recipe) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters