Skip to content

Commit

Permalink
Merge pull request #1 from depromeet/develop
Browse files Browse the repository at this point in the history
Fork Sync: Update from parent repository
  • Loading branch information
github-actions[bot] authored Apr 30, 2024
2 parents 7985108 + 4c74585 commit f56598f
Show file tree
Hide file tree
Showing 118 changed files with 3,891 additions and 1,493 deletions.
2 changes: 1 addition & 1 deletion 14th-team5-iOS/App/Sources/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
removeKeychainAtFirstLaunch()
bindRepositories()
App.indicator.bind()

return true
}

Expand Down
2 changes: 1 addition & 1 deletion 14th-team5-iOS/App/Sources/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
}

self.window = UIWindow(windowScene: scene)
self.window?.rootViewController = UINavigationController(rootViewController: HomeDIContainer().makeViewController())
self.window?.rootViewController = UINavigationController(rootViewController: MainViewDIContainer().makeViewController())
self.window?.makeKeyAndVisible()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public final class DisplayEditCollectionViewCell: BaseCollectionViewCell<Display
super.setupUI()
self.contentView.addSubviews(blurContainerView, descriptionLabel)
}

public override func layoutSubviews() {
descriptionLabel.textAlignment = .center
}

public override func setupAttributes() {
super.setupAttributes()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final public class FamilyMemberProfileCellReactor: Reactor {
memberId: memberResponse.memberId,
name: memberResponse.name,
imageUrl: memberResponse.profileImageURL,
dayOfBirth: memberResponse.dayOfBirth,
dayOfBirth: memberResponse.dayOfBirth ?? Date(),
isMe: isMe
)
}
Expand Down
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())
}
}

This file was deleted.

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()
}
}
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())
}
}
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())
}
}
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())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ import UIKit
import Core

final class TimerDIContainer {
private var globalState: GlobalStateProviderProtocol {
guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else {
return GlobalStateProvider()
}
return appDelegate.globalStateProvider
func makeView() -> TimerView {
return TimerView(reactor: makeReactor())
}

func makeReactor(isSelfUploaded: Bool, isAllUploaded: Bool) -> TimerReactor {
return TimerReactor(provider: globalState, isSelfUploaded: isSelfUploaded, isAllUploaded: isAllUploaded)
func makeReactor() -> TimerReactor {
return TimerReactor()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@
import RxDataSources
import Domain

struct FamilySection {
typealias Model = SectionModel<Int, Item>

enum Item {
case main(ProfileData)
}
}

extension FamilySection.Item: Equatable, Hashable {
public static func == (lhs: FamilySection.Item, rhs: FamilySection.Item) -> Bool {
switch (lhs, rhs) {
case (.main(let leftFamily), .main(let rightFamily)):
return leftFamily == rightFamily
default:
return false
}
}

public func hash(into hasher: inout Hasher) {
switch self {
case .main(let family):
hasher.combine(family)
default:
break
}
}
}
//struct FamilySection {
// typealias Model = SectionModel<Int, Item>
//
// enum Item {
// case main(ProfileData)
// }
//}
//
//extension FamilySection.Item: Equatable, Hashable {
// public static func == (lhs: FamilySection.Item, rhs: FamilySection.Item) -> Bool {
// switch (lhs, rhs) {
// case (.main(let leftFamily), .main(let rightFamily)):
// return leftFamily == rightFamily
// default:
// return false
// }
// }
//
// public func hash(into hasher: inout Hasher) {
// switch self {
// case .main(let family):
// hasher.combine(family)
// default:
// break
// }
// }
//}
Loading

0 comments on commit f56598f

Please sign in to comment.