Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ”€ :: (#534) ์ข‹์•„์š” ํ™”๋ฉด์„ ๋ฆฌ์•กํ„ฐํ‚ท์œผ๋กœ ๋ฆฌํŒฉํ•ฉ๋‹ˆ๋‹ค. #536

Merged
merged 9 commits into from
May 15, 2024
Merged
4 changes: 4 additions & 0 deletions Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ private class FavoriteDependency8f7fd37aeb6f0e5d0e30Provider: FavoriteDependency
var textPopUpFactory: any TextPopUpFactory {
return appComponent.textPopUpFactory
}
var signInFactory: any SignInFactory {
return appComponent.signInFactory
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
Expand Down Expand Up @@ -1002,6 +1005,7 @@ extension FavoriteComponent: Registration {
keyPathToName[\FavoriteDependency.deleteFavoriteListUseCase] = "deleteFavoriteListUseCase-any DeleteFavoriteListUseCase"
keyPathToName[\FavoriteDependency.logoutUseCase] = "logoutUseCase-any LogoutUseCase"
keyPathToName[\FavoriteDependency.textPopUpFactory] = "textPopUpFactory-any TextPopUpFactory"
keyPathToName[\FavoriteDependency.signInFactory] = "signInFactory-any SignInFactory"
}
}
extension RequestComponent: Registration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public final class AfterSearchReactor: Reactor {
private let fetchSearchSongUseCase: FetchSearchSongUseCase

public enum Action {
case fetchData(String)
case updateData(String)
}

public enum Mutation {
case fetchData([[SearchSectionModel]])
case updateData([[SearchSectionModel]])
}

public struct State {
Expand All @@ -39,7 +39,7 @@ public final class AfterSearchReactor: Reactor {
var newState = state

switch mutation {
case let .fetchData(data):
case let .updateData(data):
newState.dataSource = data
}

Expand All @@ -48,7 +48,7 @@ public final class AfterSearchReactor: Reactor {

public func mutate(action: Action) -> Observable<Mutation> {
switch action {
case let .fetchData(text):
case let .updateData(text):
return fetchData(text)
}
}
Expand Down Expand Up @@ -90,6 +90,6 @@ private extension AfterSearchReactor {

return results
}
.map { Mutation.fetchData($0) }
.map { Mutation.updateData($0) }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ extension SearchViewController {
return
}

childReactor.action.onNext(.fetchData(text))
childReactor.action.onNext(.updateData(text))
} else if let nowChildVc = children.first as? AfterSearchViewController {
guard state == .before || state == .typing else {
return
Expand Down
45 changes: 29 additions & 16 deletions Projects/Features/StorageFeature/Resources/Storage.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -20,57 +20,67 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2Hy-W4-acm">
<rect key="frame" x="0.0" y="119" width="393" height="36"/>
<rect key="frame" x="0.0" y="75" width="393" height="36"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="yKM-SW-F9l"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JA6-iz-jxx">
<rect key="frame" x="328" y="125" width="45" height="24"/>
<rect key="frame" x="328" y="81" width="45" height="24"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="1o1-sF-vEy"/>
<constraint firstAttribute="width" constant="45" id="rbk-Nj-jx2"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q5i-s9-jcg">
<rect key="frame" x="328" y="125" width="45" height="24"/>
<rect key="frame" x="328" y="81" width="45" height="24"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="DFd-Z8-ecl"/>
<constraint firstAttribute="width" constant="45" id="gYR-7t-Ht4"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7s2-Ra-JxW">
<rect key="frame" x="0.0" y="106" width="393" height="3"/>
<color key="backgroundColor" name="blueGray100"/>
<constraints>
<constraint firstAttribute="height" constant="3" id="CA1-dU-ao4"/>
</constraints>
</view>
<view alpha="0.80000000000000004" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5pT-od-cmR">
<rect key="frame" x="20" y="114" width="61" height="36"/>
<color key="backgroundColor" name="gray100"/>
<rect key="frame" x="20" y="74" width="61" height="36"/>
<color key="backgroundColor" name="blueGray100"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="DFi-0D-WSe"/>
<constraint firstAttribute="width" constant="61" id="qaO-zG-E5g"/>
</constraints>
</view>
<view alpha="0.80000000000000004" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="W6x-My-F0r">
<rect key="frame" x="97" y="114" width="44" height="36"/>
<color key="backgroundColor" name="gray100"/>
<rect key="frame" x="89" y="74" width="61" height="36"/>
<color key="backgroundColor" name="blueGray100"/>
<constraints>
<constraint firstAttribute="width" constant="44" id="35R-hy-RWN"/>
<constraint firstAttribute="width" constant="61" id="35R-hy-RWN"/>
<constraint firstAttribute="height" constant="36" id="3bI-MM-0kn"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="gpa-Bd-Phk"/>
<color key="backgroundColor" name="gray100"/>
<constraints>
<constraint firstItem="gpa-Bd-Phk" firstAttribute="trailing" secondItem="7s2-Ra-JxW" secondAttribute="trailing" id="DPd-Lp-Cou"/>
<constraint firstItem="JA6-iz-jxx" firstAttribute="centerY" secondItem="2Hy-W4-acm" secondAttribute="centerY" id="Jtx-Jm-jer"/>
<constraint firstItem="2Hy-W4-acm" firstAttribute="top" secondItem="gpa-Bd-Phk" secondAttribute="top" constant="60" id="ND4-Sl-l6n"/>
<constraint firstItem="2Hy-W4-acm" firstAttribute="top" secondItem="gpa-Bd-Phk" secondAttribute="top" constant="16" id="ND4-Sl-l6n"/>
<constraint firstItem="7s2-Ra-JxW" firstAttribute="bottom" secondItem="2Hy-W4-acm" secondAttribute="bottom" constant="-2" id="NXB-L4-tT4"/>
<constraint firstItem="2Hy-W4-acm" firstAttribute="leading" secondItem="gpa-Bd-Phk" secondAttribute="leading" id="PN3-pp-2A8"/>
<constraint firstItem="5pT-od-cmR" firstAttribute="leading" secondItem="gpa-Bd-Phk" secondAttribute="leading" constant="20" id="SNK-IZ-RI5"/>
<constraint firstItem="gpa-Bd-Phk" firstAttribute="trailing" secondItem="JA6-iz-jxx" secondAttribute="trailing" constant="20" id="Usm-Hh-DGw"/>
<constraint firstItem="W6x-My-F0r" firstAttribute="bottom" secondItem="2Hy-W4-acm" secondAttribute="bottom" constant="-5" id="WW1-2E-yXD"/>
<constraint firstItem="W6x-My-F0r" firstAttribute="bottom" secondItem="2Hy-W4-acm" secondAttribute="bottom" constant="-1" id="WW1-2E-yXD"/>
<constraint firstItem="2Hy-W4-acm" firstAttribute="trailing" secondItem="gpa-Bd-Phk" secondAttribute="trailing" id="Xg5-sg-fpQ"/>
<constraint firstItem="gpa-Bd-Phk" firstAttribute="trailing" secondItem="q5i-s9-jcg" secondAttribute="trailing" constant="20" id="Zzl-zw-pxT"/>
<constraint firstItem="W6x-My-F0r" firstAttribute="leading" secondItem="5pT-od-cmR" secondAttribute="trailing" constant="16" id="cl6-58-bin"/>
<constraint firstItem="5pT-od-cmR" firstAttribute="bottom" secondItem="2Hy-W4-acm" secondAttribute="bottom" constant="-5" id="iXh-oi-bHC"/>
<constraint firstItem="W6x-My-F0r" firstAttribute="leading" secondItem="5pT-od-cmR" secondAttribute="trailing" constant="8" symbolic="YES" id="cl6-58-bin"/>
<constraint firstItem="7s2-Ra-JxW" firstAttribute="leading" secondItem="gpa-Bd-Phk" secondAttribute="leading" id="dNZ-YU-sLI"/>
<constraint firstItem="5pT-od-cmR" firstAttribute="bottom" secondItem="2Hy-W4-acm" secondAttribute="bottom" constant="-1" id="iXh-oi-bHC"/>
<constraint firstItem="q5i-s9-jcg" firstAttribute="centerY" secondItem="2Hy-W4-acm" secondAttribute="centerY" id="uXA-7f-MOq"/>
</constraints>
</view>
Expand Down Expand Up @@ -614,7 +624,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="DGI-pW-v8E">
<rect key="frame" x="0.0" y="163" width="393" height="655"/>
<rect key="frame" x="0.0" y="119" width="393" height="699"/>
<color key="backgroundColor" name="gray100"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="MyPlayListTableViewCell" rowHeight="100" id="e4v-he-MOf" customClass="MyPlayListTableViewCell" customModule="StorageFeature">
Expand Down Expand Up @@ -711,7 +721,7 @@
<constraints>
<constraint firstItem="rd2-j6-n1X" firstAttribute="centerX" secondItem="HZM-LB-aUt" secondAttribute="centerX" id="0Gb-a5-Rtb"/>
<constraint firstItem="a8M-lJ-S1N" firstAttribute="trailing" secondItem="DGI-pW-v8E" secondAttribute="trailing" id="3oq-lY-6qZ"/>
<constraint firstItem="DGI-pW-v8E" firstAttribute="top" secondItem="a8M-lJ-S1N" secondAttribute="top" constant="104" id="T5C-3B-gJu"/>
<constraint firstItem="DGI-pW-v8E" firstAttribute="top" secondItem="a8M-lJ-S1N" secondAttribute="top" constant="60" id="T5C-3B-gJu"/>
<constraint firstItem="a8M-lJ-S1N" firstAttribute="bottom" secondItem="DGI-pW-v8E" secondAttribute="bottom" id="c6L-5y-2h2"/>
<constraint firstItem="DGI-pW-v8E" firstAttribute="leading" secondItem="a8M-lJ-S1N" secondAttribute="leading" id="ocf-AQ-eiW"/>
<constraint firstItem="rd2-j6-n1X" firstAttribute="centerY" secondItem="HZM-LB-aUt" secondAttribute="centerY" id="qHj-GV-fHC"/>
Expand All @@ -735,7 +745,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="Xyb-PZ-bnQ">
<rect key="frame" x="0.0" y="163" width="393" height="655"/>
<rect key="frame" x="0.0" y="119" width="393" height="699"/>
<color key="backgroundColor" name="gray100"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="FavoriteTableViewCell" rowHeight="100" id="Xxm-Sf-ABR" customClass="FavoriteTableViewCell" customModule="StorageFeature">
Expand Down Expand Up @@ -833,7 +843,7 @@
<constraint firstItem="1p1-jb-Mms" firstAttribute="centerX" secondItem="g0X-Hf-dA8" secondAttribute="centerX" id="3Ue-Lr-9fF"/>
<constraint firstItem="2Ib-sr-kB6" firstAttribute="bottom" secondItem="Xyb-PZ-bnQ" secondAttribute="bottom" id="51R-iB-Ku1"/>
<constraint firstItem="Xyb-PZ-bnQ" firstAttribute="leading" secondItem="2Ib-sr-kB6" secondAttribute="leading" id="ID6-NX-Xdq"/>
<constraint firstItem="Xyb-PZ-bnQ" firstAttribute="top" secondItem="2Ib-sr-kB6" secondAttribute="top" constant="104" id="Yhg-dH-e27"/>
<constraint firstItem="Xyb-PZ-bnQ" firstAttribute="top" secondItem="2Ib-sr-kB6" secondAttribute="top" constant="60" id="Yhg-dH-e27"/>
<constraint firstItem="1p1-jb-Mms" firstAttribute="centerY" secondItem="g0X-Hf-dA8" secondAttribute="centerY" id="fcA-YK-IlZ"/>
<constraint firstItem="2Ib-sr-kB6" firstAttribute="trailing" secondItem="Xyb-PZ-bnQ" secondAttribute="trailing" id="vkc-Hb-6rw"/>
</constraints>
Expand Down Expand Up @@ -1828,6 +1838,9 @@
<namedColor name="POINT">
<color red="0.035999998450279236" green="0.7850000262260437" blue="0.94999998807907104" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="blueGray100">
<color red="0.94900000095367432" green="0.9570000171661377" blue="0.96899998188018799" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="gray100">
<color red="0.94900000095367432" green="0.9570000171661377" blue="0.96899998188018799" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import BaseFeature
import BaseFeatureInterface
import Foundation
import NeedleFoundation
import SignInFeature
import SignInFeatureInterface
import UIKit
import UserDomainInterface

public protocol FavoriteDependency: Dependency {
Expand All @@ -14,19 +15,16 @@ public protocol FavoriteDependency: Dependency {
var deleteFavoriteListUseCase: any DeleteFavoriteListUseCase { get }
var logoutUseCase: any LogoutUseCase { get }
var textPopUpFactory: any TextPopUpFactory { get }
var signInFactory: any SignInFactory { get }
}

public final class FavoriteComponent: Component<FavoriteDependency> {
public func makeView() -> FavoriteViewController {
public func makeView() -> UIViewController {
return FavoriteViewController.viewController(
viewModel: .init(
fetchFavoriteSongsUseCase: dependency.fetchFavoriteSongsUseCase,
editFavoriteSongsOrderUseCase: dependency.editFavoriteSongsOrderUseCase,
deleteFavoriteListUseCase: dependency.deleteFavoriteListUseCase,
logoutUseCase: dependency.logoutUseCase
),
reactor: FavoriteReactoer(),
containSongsFactory: dependency.containSongsFactory,
textPopUpFactory: dependency.textPopUpFactory
textPopUpFactory: dependency.textPopUpFactory,
signInFactory: dependency.signInFactory
)
}
}
Loading
Loading