From 6f3e805cfcc6af4b41570089ade1e6692377f2a1 Mon Sep 17 00:00:00 2001 From: Hamp Date: Thu, 13 Jun 2024 11:47:34 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20::=20=EC=BD=94=EB=93=9C=20Format?= =?UTF-8?q?ting=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/AfterSearchComponent.swift | 2 +- .../Sources/Reactors/AfterSearchReactor.swift | 23 +++++++++---------- .../Sources/Service/SearchCommonService.swift | 1 - 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Projects/Features/SearchFeature/Sources/Components/AfterSearchComponent.swift b/Projects/Features/SearchFeature/Sources/Components/AfterSearchComponent.swift index 57a1b63c2..ac29d949d 100644 --- a/Projects/Features/SearchFeature/Sources/Components/AfterSearchComponent.swift +++ b/Projects/Features/SearchFeature/Sources/Components/AfterSearchComponent.swift @@ -15,7 +15,7 @@ public final class AfterSearchComponent: Component { return AfterSearchViewController.viewController( songSearchResultFactory: dependency.songSearchResultFactory, listSearchResultFactory: dependency.listSearchResultFactory, - reactor: .init(text:text) + reactor: .init(text: text) ) } } diff --git a/Projects/Features/SearchFeature/Sources/Reactors/AfterSearchReactor.swift b/Projects/Features/SearchFeature/Sources/Reactors/AfterSearchReactor.swift index b892b6c01..df97b33bf 100644 --- a/Projects/Features/SearchFeature/Sources/Reactors/AfterSearchReactor.swift +++ b/Projects/Features/SearchFeature/Sources/Reactors/AfterSearchReactor.swift @@ -6,42 +6,42 @@ import SongsDomainInterface public final class AfterSearchReactor: Reactor { var disposeBag: DisposeBag = DisposeBag() - + private let service: any SearchCommonService - + public enum Action {} - + public enum Mutation { case updateText(String) } - + public struct State { var text: String } - + public var initialState: State - + init(service: some SearchCommonService = DefaultSearchCommonService.shared, text: String) { self.initialState = State( text: text ) self.service = service } - + deinit { LogManager.printDebug("\(Self.self)") } - + public func mutate(action: Action) -> Observable {} - + public func reduce(state: State, mutation: Mutation) -> State { var newState = state - + switch mutation { case let .updateText(text): newState.text = text } - + return newState } } @@ -49,4 +49,3 @@ public final class AfterSearchReactor: Reactor { private extension AfterSearchReactor { #warning("유즈케이스 주입") } - diff --git a/Projects/Features/SearchFeature/Sources/Service/SearchCommonService.swift b/Projects/Features/SearchFeature/Sources/Service/SearchCommonService.swift index d18419ff1..5308ac617 100644 --- a/Projects/Features/SearchFeature/Sources/Service/SearchCommonService.swift +++ b/Projects/Features/SearchFeature/Sources/Service/SearchCommonService.swift @@ -5,7 +5,6 @@ import SearchFeatureInterface protocol SearchCommonService { var typingStatus: BehaviorSubject { get } var recentText: PublishSubject { get } - } final class DefaultSearchCommonService: SearchCommonService {