forked from depromeet/14th-team5-iOS
-
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.
Merge pull request #1 from depromeet/develop
Fork Sync: Update from parent repository
- Loading branch information
Showing
118 changed files
with
3,891 additions
and
1,493 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
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
30 changes: 30 additions & 0 deletions
30
14th-team5-iOS/App/Sources/Presentation/Home/Dependency/DescriptionDIContainer.swift
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,30 @@ | ||
// | ||
// DescriptionDIContainer.swift | ||
// App | ||
// | ||
// Created by 마경미 on 21.04.24. | ||
// | ||
|
||
import Foundation | ||
|
||
import Data | ||
import Domain | ||
|
||
final class DescriptionDIContainer { | ||
func makeView() -> DescriptionView { | ||
return DescriptionView(reactor: makeReactor()) | ||
} | ||
|
||
func makeReactor() -> DescriptionReactor { | ||
return DescriptionReactor(missionUseCase: makeUseCase()) | ||
} | ||
} | ||
|
||
extension DescriptionDIContainer { | ||
private func makeRepository() -> MissionRepositoryProtocol { | ||
return MissionRepository() | ||
} | ||
private func makeUseCase() -> GetTodayMissionUseCaseProtocol { | ||
return GetTodayMissionUseCase(missionRepository: makeRepository()) | ||
} | ||
} |
61 changes: 0 additions & 61 deletions
61
14th-team5-iOS/App/Sources/Presentation/Home/Dependency/HomeDIContainer.swift
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
14th-team5-iOS/App/Sources/Presentation/Home/Dependency/MainCameraDIContainer.swift
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,20 @@ | ||
// | ||
// MainCameraDIContainer.swift | ||
// App | ||
// | ||
// Created by 마경미 on 30.04.24. | ||
// | ||
|
||
import Foundation | ||
|
||
import Domain | ||
|
||
final class MainCameraDIContainer { | ||
func makeView() -> MainCameraButtonView { | ||
return MainCameraButtonView(reactor: makeReactor()) | ||
} | ||
|
||
func makeReactor() -> MainCameraReactor { | ||
return MainCameraReactor() | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
14th-team5-iOS/App/Sources/Presentation/Home/Dependency/MainFamilyViewDIContainer.swift
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,41 @@ | ||
// | ||
// MainFamilyDIContainer.swift | ||
// App | ||
// | ||
// Created by 마경미 on 21.04.24. | ||
// | ||
|
||
import UIKit | ||
import Foundation | ||
|
||
import Core | ||
import Data | ||
import Domain | ||
|
||
final class MainFamilyViewDIContainer { | ||
private var globalState: GlobalStateProviderProtocol { | ||
guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { | ||
return GlobalStateProvider() | ||
} | ||
return appDelegate.globalStateProvider | ||
} | ||
|
||
|
||
func makeViewController() -> MainFamilyViewController { | ||
return MainFamilyViewController(reactor: makeReactor()) | ||
} | ||
|
||
private func makeReactor() -> MainFamilyViewReactor { | ||
return MainFamilyViewReactor(provider: globalState, familyUseCase: makeInviteFamilyUseCase()) | ||
} | ||
} | ||
|
||
extension MainFamilyViewDIContainer { | ||
private func makeInviteFamilyRepository() -> FamilyRepositoryProtocol { | ||
return FamilyRepository() | ||
} | ||
|
||
private func makeInviteFamilyUseCase() -> FamilyUseCaseProtocol { | ||
return FamilyUseCase(familyRepository: makeInviteFamilyRepository()) | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
14th-team5-iOS/App/Sources/Presentation/Home/Dependency/MainPostViewDIContainer.swift
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,37 @@ | ||
// | ||
// SurvivalDIContainer.swift | ||
// App | ||
// | ||
// Created by 마경미 on 21.04.24. | ||
// | ||
|
||
import Foundation | ||
|
||
import Core | ||
import Data | ||
import Domain | ||
|
||
|
||
final class MainPostViewDIContainer { | ||
func makeViewController(type: PostType) -> MainPostViewController { | ||
return MainPostViewController(reactor: makeReactor(type: type)) | ||
} | ||
|
||
private func makeReactor(type: PostType) -> MainPostViewReactor { | ||
return MainPostViewReactor(initialState: .init(type: type), postUseCase: makePostUseCase()) | ||
} | ||
} | ||
|
||
extension MainPostViewDIContainer { | ||
private func makePostRepository() -> PostListRepositoryProtocol { | ||
return PostListAPIs.Worker() | ||
} | ||
|
||
func makeUploadPostRepository() -> UploadPostRepositoryProtocol { | ||
return PostUserDefaultsRepository() | ||
} | ||
|
||
func makePostUseCase() -> PostListUseCaseProtocol { | ||
return PostListUseCase(postListRepository: makePostRepository(), uploadePostRepository: makeUploadPostRepository()) | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
14th-team5-iOS/App/Sources/Presentation/Home/Dependency/MainViewDIContainer.swift
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,41 @@ | ||
// | ||
// HomeDIContainer.swift | ||
// App | ||
// | ||
// Created by 마경미 on 24.12.23. | ||
// | ||
|
||
import UIKit | ||
|
||
import Data | ||
import Domain | ||
import Core | ||
|
||
|
||
final class MainViewDIContainer { | ||
private var globalState: GlobalStateProviderProtocol { | ||
guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { | ||
return GlobalStateProvider() | ||
} | ||
return appDelegate.globalStateProvider | ||
} | ||
|
||
|
||
func makeViewController() -> MainViewController { | ||
return MainViewController(reactor: makeReactor()) | ||
} | ||
} | ||
|
||
extension MainViewDIContainer { | ||
private func makeReactor() -> MainViewReactor { | ||
return MainViewReactor(initialState: .init(isInTime: false), fetchMainUseCase: makeFetchMainUseCase(), provider: globalState) | ||
} | ||
|
||
private func makeMainRepository() -> MainRepository { | ||
return MainRepository() | ||
} | ||
|
||
private func makeFetchMainUseCase() -> FetchMainUseCaseProtocol { | ||
return FetchMainUseCase(mainRepository: makeMainRepository()) | ||
} | ||
} |
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
Oops, something went wrong.