Skip to content

Commit

Permalink
🚚 :: [#94] MyViolationListFeature / MyViolationHistoryFeature -> MyVi…
Browse files Browse the repository at this point in the history
…olationListFeature
  • Loading branch information
baekteun committed Jul 25, 2023
1 parent e67ebf4 commit 9e0a595
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public extension ModulePaths {

public extension ModulePaths {
enum Feature: String, MicroTargetPathConvertable {
case MyViolationHistoryFeature
case MyViolationListFeature
case SplashFeature
case ConfirmationDialogFeature
case MusicFeature
Expand Down
2 changes: 1 addition & 1 deletion Projects/Feature/HomeFeature/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let project = Project.module(
dependencies: [
.feature(target: .BaseFeature),
.feature(target: .ConfirmationDialogFeature),
.feature(target: .MyViolationHistoryFeature),
.feature(target: .MyViolationListFeature),
.domain(target: .SelfStudyDomain, type: .interface),
.domain(target: .MassageDomain, type: .interface),
.domain(target: .MealDomain, type: .interface),
Expand Down
21 changes: 0 additions & 21 deletions Projects/Feature/MyViolationHistoryFeature/Project.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Inject
import UIKit
@testable import MyViolationHistoryFeature
@testable import MyViolationListFeature

@main
final class AppDelegate: UIResponder, UIApplicationDelegate {
Expand All @@ -11,9 +11,9 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
let store = MyViolationHistoryStore()
let store = MyViolationListStore()
let viewController = Inject.ViewControllerHost(
MyViolationHistoryViewController(store: store)
MyViolationListViewController(store: store)
)
window?.rootViewController = viewController
window?.makeKeyAndVisible()
Expand Down
21 changes: 21 additions & 0 deletions Projects/Feature/MyViolationListFeature/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import ProjectDescription
import ProjectDescriptionHelpers
import DependencyPlugin

let project = Project.module(
name: ModulePaths.Feature.MyViolationListFeature.rawValue,
targets: [
.implements(module: .feature(.MyViolationListFeature), dependencies: [
.feature(target: .BaseFeature),
.domain(target: .ViolationDomain, type: .interface)
]),
.tests(module: .feature(.MyViolationListFeature), dependencies: [
.feature(target: .MyViolationListFeature),
.domain(target: .ViolationDomain, type: .testing)
]),
.demo(module: .feature(.MyViolationListFeature), dependencies: [
.feature(target: .MyViolationListFeature),
.domain(target: .ViolationDomain, type: .testing)
])
]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import BaseFeature

public protocol MyViolationListFactory {
func makeViewController() -> any StoredViewControllable
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import MSGLayout
import UIKit
import UIKitUtil

final class MyViolationHistoryViewController: BaseStoredModalViewController<MyViolationHistoryStore> {
final class MyViolationListViewController: BaseStoredModalViewController<MyViolationListStore> {
private enum Metric {
static let padding: CGFloat = 24
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Combine
import Store
import Moordinator

final class MyViolationHistoryStore: BaseStore {
final class MyViolationListStore: BaseStore {
var route: PassthroughSubject<RoutePath, Never> = .init()
var subscription: Set<AnyCancellable> = .init()
var initialState: State
Expand All @@ -19,13 +19,13 @@ final class MyViolationHistoryStore: BaseStore {
enum Mutation {}
}

extension MyViolationHistoryStore {
extension MyViolationListStore {
func mutate(state: State, action: Action) -> SideEffect<Mutation, Never> {
.none
}
}

extension MyViolationHistoryStore {
extension MyViolationListStore {
func reduce(state: State, mutate: Mutation) -> State {
state
}
Expand Down

0 comments on commit 9e0a595

Please sign in to comment.