Skip to content

Commit

Permalink
Merge pull request #11 from f-lab-edu/feature/feedListInteractor
Browse files Browse the repository at this point in the history
Fix: ViewModel을 Interactor로 네이밍 변경
  • Loading branch information
GeonH0 authored Jun 24, 2024
2 parents 798fde0 + dccb1a1 commit a525f70
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions HomeCafeRecipes/HomeCafeRecipes.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
1D4741D32C1B4F8D009381CE /* RecipePageDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4741CE2C1B4F8D009381CE /* RecipePageDTO.swift */; };
1D4741D42C1B4F8D009381CE /* NetworkResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4741CF2C1B4F8D009381CE /* NetworkResponseDTO.swift */; };
1D4741D52C1B4F8D009381CE /* UserDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4741D02C1B4F8D009381CE /* UserDTO.swift */; };
1D4741D72C1B4FF4009381CE /* RecipeListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4741D62C1B4FF4009381CE /* RecipeListViewModel.swift */; };
1DDFFD812C1C096A0083B077 /* RecipeMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DDFFD802C1C096A0083B077 /* RecipeMapper.swift */; };
1DE19E9D2C1B3DC10031804A /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19E9C2C1B3DC10031804A /* SceneDelegate.swift */; };
1DE19EA72C1B420A0031804A /* FeedListRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EA52C1B420A0031804A /* FeedListRepository.swift */; };
Expand All @@ -43,6 +42,7 @@
1DE19EC52C1B422F0031804A /* RecipeListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EBD2C1B422F0031804A /* RecipeListView.swift */; };
1DE19EC62C1B422F0031804A /* RecipeListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DE19EBE2C1B422F0031804A /* RecipeListCell.swift */; };
1DE19EC82C1B4C2D0031804A /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 1DE19EC72C1B4C2D0031804A /* Kingfisher */; };
1DF829B12C299F1F00C337FC /* RecipeListInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DF829B02C299F1F00C337FC /* RecipeListInteractor.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -87,7 +87,6 @@
1D4741CE2C1B4F8D009381CE /* RecipePageDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipePageDTO.swift; sourceTree = "<group>"; };
1D4741CF2C1B4F8D009381CE /* NetworkResponseDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkResponseDTO.swift; sourceTree = "<group>"; };
1D4741D02C1B4F8D009381CE /* UserDTO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserDTO.swift; sourceTree = "<group>"; };
1D4741D62C1B4FF4009381CE /* RecipeListViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeListViewModel.swift; sourceTree = "<group>"; };
1DDFFD802C1C096A0083B077 /* RecipeMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecipeMapper.swift; sourceTree = "<group>"; };
1DE19E9C2C1B3DC10031804A /* SceneDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
1DE19EA52C1B420A0031804A /* FeedListRepository.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedListRepository.swift; sourceTree = "<group>"; };
Expand All @@ -100,6 +99,7 @@
1DE19EBC2C1B422F0031804A /* RecipeListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeListViewController.swift; sourceTree = "<group>"; };
1DE19EBD2C1B422F0031804A /* RecipeListView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeListView.swift; sourceTree = "<group>"; };
1DE19EBE2C1B422F0031804A /* RecipeListCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeListCell.swift; sourceTree = "<group>"; };
1DF829B02C299F1F00C337FC /* RecipeListInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipeListInteractor.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -257,7 +257,7 @@
1D740B402C15E6680001B704 /* Domain */ = {
isa = PBXGroup;
children = (
1DE19EA12C1B41FE0031804A /* ViewModel */,
1DF829AF2C299F1F00C337FC /* Interactor */,
1D1283A02C15E92C00C5A870 /* UseCases */,
1D12839F2C15E7A700C5A870 /* Entities */,
);
Expand All @@ -272,14 +272,6 @@
path = Mapper;
sourceTree = "<group>";
};
1DE19EA12C1B41FE0031804A /* ViewModel */ = {
isa = PBXGroup;
children = (
1D4741D62C1B4FF4009381CE /* RecipeListViewModel.swift */,
);
path = ViewModel;
sourceTree = "<group>";
};
1DE19EA42C1B420A0031804A /* Repositories */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -336,6 +328,14 @@
path = View;
sourceTree = "<group>";
};
1DF829AF2C299F1F00C337FC /* Interactor */ = {
isa = PBXGroup;
children = (
1DF829B02C299F1F00C337FC /* RecipeListInteractor.swift */,
);
path = Interactor;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -477,6 +477,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1DF829B12C299F1F00C337FC /* RecipeListInteractor.swift in Sources */,
1D2C16EA2BE532B700C04508 /* ViewController.swift in Sources */,
1DE19EC52C1B422F0031804A /* RecipeListView.swift in Sources */,
1D4741D32C1B4F8D009381CE /* RecipePageDTO.swift in Sources */,
Expand All @@ -494,7 +495,6 @@
1D4741D52C1B4F8D009381CE /* UserDTO.swift in Sources */,
1DE19EC22C1B422F0031804A /* RecipeListItemViewModel.swift in Sources */,
1DE19EC32C1B422F0031804A /* SearchBar.swift in Sources */,
1D4741D72C1B4FF4009381CE /* RecipeListViewModel.swift in Sources */,
1DE19E9D2C1B3DC10031804A /* SceneDelegate.swift in Sources */,
1D4741D12C1B4F8D009381CE /* RecipeImageDTO.swift in Sources */,
1DE19EA72C1B420A0031804A /* FeedListRepository.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ protocol RecipeListViewModelDelegate: AnyObject {
func didFail(with error: Error)
}

protocol InputRecipeListViewModel {
protocol InputRecipeListInteractor {
func viewDidLoad()
func fetchNextPage()
func didSelectItem(id: Int) -> RecipeItemViewModel?
func searchRecipes(with query: String)
func resetSearch()
}

protocol OutputRecipeListViewModel {
protocol OutputRecipeListInteractor {
var recipes: Observable<[RecipeListItemViewModel]> { get }
var error: Observable<Error?> { get }
}

class RecipeListViewModel: InputRecipeListViewModel, OutputRecipeListViewModel {
class RecipeListInteractor: InputRecipeListInteractor, OutputRecipeListInteractor {

private let disposeBag = DisposeBag()
private let fetchFeedListUseCase: FetchFeedListUseCase
Expand Down

0 comments on commit a525f70

Please sign in to comment.