From 8bf629b41d33b27a4211405eb705278ccf23df3d Mon Sep 17 00:00:00 2001 From: baegteun Date: Mon, 28 Oct 2024 22:25:16 +0900 Subject: [PATCH 1/6] =?UTF-8?q?:sparkles:=20::=20[#1316]=20=EC=9D=8C?= =?UTF-8?q?=EC=95=85=20=EC=83=81=EC=84=B8=EC=97=90=EC=84=9C=20=EC=95=84?= =?UTF-8?q?=ED=8B=B0=EC=8A=A4=ED=8A=B8=20=EC=9D=B4=EB=A6=84=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EC=8B=9C=20=ED=81=AC=EB=A0=88=EB=94=A7=20=ED=98=B9?= =?UTF-8?q?=EC=9D=80=20=EC=95=84=ED=8B=B0=EC=8A=A4=ED=8A=B8=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=EB=A1=9C=20=EC=9D=B4=EB=8F=99"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Application/AppComponent+Artist.swift | 6 ++++ .../DataSource/RemoteArtistDataSource.swift | 1 + .../Repository/ArtistRepository.swift | 1 + .../UseCase/FindArtistIDUseCase.swift | 5 ++++ .../ArtistDomain/Sources/API/ArtistAPI.swift | 15 ++++++++-- .../RemoteArtistDataSourceImpl.swift | 6 ++++ .../Repository/ArtistRepositoryImpl.swift | 4 +++ .../ResponseDTO/FindArtistIDResponseDTO.swift | 5 ++++ .../UseCase/FindArtistIDUseCaseImpl.swift | 16 ++++++++++ .../Features/MusicDetailFeature/Project.swift | 10 +++++-- .../Component/MusicDetailComponent.swift | 8 ++++- .../MusicDetail/MusicDetailReactor.swift | 29 ++++++++++++++++++- .../Sources/MusicDetail/MusicDetailView.swift | 2 ++ .../MusicDetailViewController.swift | 18 ++++++++++++ .../MusicControlView/MusicControlView.swift | 11 ++++++- .../Sources/Utils/UniquedSequence.swift | 6 ++++ 16 files changed, 135 insertions(+), 8 deletions(-) create mode 100644 Projects/Domains/ArtistDomain/Interface/UseCase/FindArtistIDUseCase.swift create mode 100644 Projects/Domains/ArtistDomain/Sources/ResponseDTO/FindArtistIDResponseDTO.swift create mode 100644 Projects/Domains/ArtistDomain/Sources/UseCase/FindArtistIDUseCaseImpl.swift diff --git a/Projects/App/Sources/Application/AppComponent+Artist.swift b/Projects/App/Sources/Application/AppComponent+Artist.swift index c6ff090c8..1c7c96532 100644 --- a/Projects/App/Sources/Application/AppComponent+Artist.swift +++ b/Projects/App/Sources/Application/AppComponent+Artist.swift @@ -56,6 +56,12 @@ public extension AppComponent { } } + var findArtistIDUseCase: any FindArtistIDUseCase { + shared { + FindArtistIDUseCaseImpl(artistRepository: artistRepository) + } + } + // MARK: Artist Detail > Artist Music var artistMusicComponent: ArtistMusicComponent { ArtistMusicComponent(parent: self) diff --git a/Projects/Domains/ArtistDomain/Interface/DataSource/RemoteArtistDataSource.swift b/Projects/Domains/ArtistDomain/Interface/DataSource/RemoteArtistDataSource.swift index 13b9d9204..b1bb8fc5a 100644 --- a/Projects/Domains/ArtistDomain/Interface/DataSource/RemoteArtistDataSource.swift +++ b/Projects/Domains/ArtistDomain/Interface/DataSource/RemoteArtistDataSource.swift @@ -7,4 +7,5 @@ public protocol RemoteArtistDataSource { func fetchArtistSongList(id: String, sort: ArtistSongSortType, page: Int) -> Single<[ArtistSongListEntity]> func fetchArtistSubscriptionStatus(id: String) -> Single func subscriptionArtist(id: String, on: Bool) -> Completable + func findArtistID(name: String) -> Single } diff --git a/Projects/Domains/ArtistDomain/Interface/Repository/ArtistRepository.swift b/Projects/Domains/ArtistDomain/Interface/Repository/ArtistRepository.swift index 45d84abd2..d3aca2a5c 100644 --- a/Projects/Domains/ArtistDomain/Interface/Repository/ArtistRepository.swift +++ b/Projects/Domains/ArtistDomain/Interface/Repository/ArtistRepository.swift @@ -7,4 +7,5 @@ public protocol ArtistRepository { func fetchArtistSongList(id: String, sort: ArtistSongSortType, page: Int) -> Single<[ArtistSongListEntity]> func fetchArtistSubscriptionStatus(id: String) -> Single func subscriptionArtist(id: String, on: Bool) -> Completable + func findArtistID(name: String) -> Single } diff --git a/Projects/Domains/ArtistDomain/Interface/UseCase/FindArtistIDUseCase.swift b/Projects/Domains/ArtistDomain/Interface/UseCase/FindArtistIDUseCase.swift new file mode 100644 index 000000000..b2ce2a44e --- /dev/null +++ b/Projects/Domains/ArtistDomain/Interface/UseCase/FindArtistIDUseCase.swift @@ -0,0 +1,5 @@ +import RxSwift + +public protocol FindArtistIDUseCase { + func execute(name: String) -> Single +} diff --git a/Projects/Domains/ArtistDomain/Sources/API/ArtistAPI.swift b/Projects/Domains/ArtistDomain/Sources/API/ArtistAPI.swift index 7ce3569a1..4f0b9b52b 100644 --- a/Projects/Domains/ArtistDomain/Sources/API/ArtistAPI.swift +++ b/Projects/Domains/ArtistDomain/Sources/API/ArtistAPI.swift @@ -10,6 +10,7 @@ public enum ArtistAPI { case fetchArtistSongList(id: String, sort: ArtistSongSortType, page: Int) case fetchSubscriptionStatus(id: String) case subscriptionArtist(id: String, on: Bool) + case findArtistID(name: String) } extension ArtistAPI: WMAPI { @@ -29,6 +30,8 @@ extension ArtistAPI: WMAPI { return "/\(id)/subscription" case let .subscriptionArtist(id, _): return "/\(id)/subscription" + case let .findArtistID(name): + return "/find" } } @@ -37,7 +40,8 @@ extension ArtistAPI: WMAPI { case .fetchArtistList, .fetchArtistDetail, .fetchArtistSongList, - .fetchSubscriptionStatus: + .fetchSubscriptionStatus, + .findArtistID: return .get case let .subscriptionArtist(_, on): return on ? .post : .delete @@ -59,12 +63,19 @@ extension ArtistAPI: WMAPI { ], encoding: URLEncoding.queryString ) + case let .findArtistID(name): + return .requestParameters( + parameters: [ + "name": name + ], + encoding: URLEncoding.queryString + ) } } public var jwtTokenType: JwtTokenType { switch self { - case .fetchArtistList, .fetchArtistDetail, .fetchArtistSongList: + case .fetchArtistList, .fetchArtistDetail, .fetchArtistSongList, .findArtistID: return .none case .fetchSubscriptionStatus, .subscriptionArtist: return .accessToken diff --git a/Projects/Domains/ArtistDomain/Sources/DataSource/RemoteArtistDataSourceImpl.swift b/Projects/Domains/ArtistDomain/Sources/DataSource/RemoteArtistDataSourceImpl.swift index 36c18ffe4..1d0f65c6f 100644 --- a/Projects/Domains/ArtistDomain/Sources/DataSource/RemoteArtistDataSourceImpl.swift +++ b/Projects/Domains/ArtistDomain/Sources/DataSource/RemoteArtistDataSourceImpl.swift @@ -32,4 +32,10 @@ public final class RemoteArtistDataSourceImpl: BaseRemoteDataSource, request(.subscriptionArtist(id: id, on: on)) .asCompletable() } + + public func findArtistID(name: String) -> Single { + request(.findArtistID(name: name)) + .map(FindArtistIDResponseDTO.self) + .map { $0.id } + } } diff --git a/Projects/Domains/ArtistDomain/Sources/Repository/ArtistRepositoryImpl.swift b/Projects/Domains/ArtistDomain/Sources/Repository/ArtistRepositoryImpl.swift index 80b82c2ce..a0d9ec2d6 100644 --- a/Projects/Domains/ArtistDomain/Sources/Repository/ArtistRepositoryImpl.swift +++ b/Projects/Domains/ArtistDomain/Sources/Repository/ArtistRepositoryImpl.swift @@ -29,4 +29,8 @@ public final class ArtistRepositoryImpl: ArtistRepository { public func subscriptionArtist(id: String, on: Bool) -> Completable { remoteArtistDataSource.subscriptionArtist(id: id, on: on) } + + public func findArtistID(name: String) -> Single { + remoteArtistDataSource.findArtistID(name: name) + } } diff --git a/Projects/Domains/ArtistDomain/Sources/ResponseDTO/FindArtistIDResponseDTO.swift b/Projects/Domains/ArtistDomain/Sources/ResponseDTO/FindArtistIDResponseDTO.swift new file mode 100644 index 000000000..8657cf15e --- /dev/null +++ b/Projects/Domains/ArtistDomain/Sources/ResponseDTO/FindArtistIDResponseDTO.swift @@ -0,0 +1,5 @@ +import Foundation + +struct FindArtistIDResponseDTO: Decodable { + let id: String +} diff --git a/Projects/Domains/ArtistDomain/Sources/UseCase/FindArtistIDUseCaseImpl.swift b/Projects/Domains/ArtistDomain/Sources/UseCase/FindArtistIDUseCaseImpl.swift new file mode 100644 index 000000000..163385f45 --- /dev/null +++ b/Projects/Domains/ArtistDomain/Sources/UseCase/FindArtistIDUseCaseImpl.swift @@ -0,0 +1,16 @@ +import ArtistDomainInterface +import RxSwift + +public struct FindArtistIDUseCaseImpl: FindArtistIDUseCase { + private let artistRepository: any ArtistRepository + + public init( + artistRepository: any ArtistRepository + ) { + self.artistRepository = artistRepository + } + + public func execute(name: String) -> Single { + return artistRepository.findArtistID(name: name) + } +} diff --git a/Projects/Features/MusicDetailFeature/Project.swift b/Projects/Features/MusicDetailFeature/Project.swift index 38a0896e7..6f5af8b8e 100644 --- a/Projects/Features/MusicDetailFeature/Project.swift +++ b/Projects/Features/MusicDetailFeature/Project.swift @@ -12,18 +12,22 @@ let project = Project.module( .feature(target: .LyricHighlightingFeature, type: .interface), .feature(target: .SongCreditFeature, type: .interface), .feature(target: .SignInFeature, type: .interface), + .feature(target: .ArtistFeature, type: .interface), .domain(target: .SongsDomain, type: .interface), - .domain(target: .LikeDomain, type: .interface) + .domain(target: .LikeDomain, type: .interface), + .domain(target: .ArtistDomain, type: .interface) ]), .tests(module: .feature(.MusicDetailFeature), dependencies: [ .feature(target: .MusicDetailFeature), .domain(target: .SongsDomain, type: .testing), - .domain(target: .LikeDomain, type: .testing) + .domain(target: .LikeDomain, type: .testing), + .domain(target: .ArtistDomain, type: .testing) ]), .demo(module: .feature(.MusicDetailFeature), dependencies: [ .feature(target: .MusicDetailFeature), .domain(target: .SongsDomain, type: .testing), - .domain(target: .LikeDomain, type: .testing) + .domain(target: .LikeDomain, type: .testing), + .domain(target: .ArtistDomain, type: .testing) ]) ] ) diff --git a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/Component/MusicDetailComponent.swift b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/Component/MusicDetailComponent.swift index a7fce96d3..55bfb6210 100644 --- a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/Component/MusicDetailComponent.swift +++ b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/Component/MusicDetailComponent.swift @@ -1,3 +1,5 @@ +import ArtistDomainInterface +import ArtistFeatureInterface import BaseFeature import BaseFeatureInterface import LikeDomainInterface @@ -17,9 +19,11 @@ public protocol MusicDetailDependency: Dependency { var containSongsFactory: any ContainSongsFactory { get } var karaokeFactory: any KaraokeFactory { get } var textPopupFactory: any TextPopupFactory { get } + var artistDetailFactory: any ArtistDetailFactory { get } var playlistPresenterGlobalState: any PlayListPresenterGlobalStateProtocol { get } var addLikeSongUseCase: any AddLikeSongUseCase { get } var cancelLikeSongUseCase: any CancelLikeSongUseCase { get } + var findArtistIDUseCase: any FindArtistIDUseCase { get } } public final class MusicDetailComponent: Component, MusicDetailFactory { @@ -29,7 +33,8 @@ public final class MusicDetailComponent: Component, Music selectedID: selectedID, fetchSongUseCase: dependency.fetchSongUseCase, addLikeSongUseCase: dependency.addLikeSongUseCase, - cancelLikeSongUseCase: dependency.cancelLikeSongUseCase + cancelLikeSongUseCase: dependency.cancelLikeSongUseCase, + findArtistIDUseCase: dependency.findArtistIDUseCase ) let viewController = MusicDetailViewController( @@ -40,6 +45,7 @@ public final class MusicDetailComponent: Component, Music containSongsFactory: dependency.containSongsFactory, textPopupFactory: dependency.textPopupFactory, karaokeFactory: dependency.karaokeFactory, + artistDetailFactory: dependency.artistDetailFactory, playlistPresenterGlobalState: dependency.playlistPresenterGlobalState ) diff --git a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailReactor.swift b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailReactor.swift index 9bda66e2e..8b3f9bc6e 100644 --- a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailReactor.swift +++ b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailReactor.swift @@ -1,3 +1,4 @@ +import ArtistDomainInterface import BaseFeature import Foundation import Kingfisher @@ -30,6 +31,7 @@ final class MusicDetailReactor: Reactor { case musicPickButtonDidTap case playListButtonDidTap case dismissButtonDidTap + case didTapArtistLabel } enum Mutation { @@ -48,6 +50,7 @@ final class MusicDetailReactor: Reactor { case textPopup(text: String, completion: () -> Void) case signin case karaoke(ky: Int?, tj: Int?) + case artist(artistID: String) } struct State { @@ -71,6 +74,7 @@ final class MusicDetailReactor: Reactor { private let fetchSongUseCase: any FetchSongUseCase private let addLikeSongUseCase: any AddLikeSongUseCase private let cancelLikeSongUseCase: any CancelLikeSongUseCase + private let findArtistIDUseCase: any FindArtistIDUseCase private var shouldRefreshLikeList = false private var pendingLikeRequests: [String: LikeRequest] = [:] @@ -83,7 +87,8 @@ final class MusicDetailReactor: Reactor { selectedID: String, fetchSongUseCase: any FetchSongUseCase, addLikeSongUseCase: any AddLikeSongUseCase, - cancelLikeSongUseCase: any CancelLikeSongUseCase + cancelLikeSongUseCase: any CancelLikeSongUseCase, + findArtistIDUseCase: any FindArtistIDUseCase ) { let selectedIndex = songIDs.firstIndex(of: selectedID) ?? 0 self.initialState = .init( @@ -94,6 +99,7 @@ final class MusicDetailReactor: Reactor { self.fetchSongUseCase = fetchSongUseCase self.addLikeSongUseCase = addLikeSongUseCase self.cancelLikeSongUseCase = cancelLikeSongUseCase + self.findArtistIDUseCase = findArtistIDUseCase let urls = [ songIDs[safe: selectedIndex - 1], @@ -133,6 +139,8 @@ final class MusicDetailReactor: Reactor { return playListButtonDidTap() case .dismissButtonDidTap: return navigateMutation(navigate: .dismiss) + case .didTapArtistLabel: + return didTapArtistLabel() } } @@ -416,6 +424,25 @@ private extension MusicDetailReactor { LogManager.analytics(log) return navigateMutation(navigate: .playlist(id: song.videoID)) } + + func didTapArtistLabel() -> Observable { + guard let selectedSong = currentState.selectedSong else { return .empty() } + let artists = selectedSong.artistString.components(separatedBy: ",") + + if artists.count == 1, let artistName = artists.first { + return findArtistIDUseCase.execute(name: artistName) + .asObservable() + .flatMap { + return Observable.concat( + .just(Mutation.navigate(.artist(artistID: $0))), + .just(.navigate(nil)) + ) + } + .catchAndReturn(.navigate(.credit(id: selectedSong.videoID))) + } else { + return navigateMutation(navigate: .credit(id: selectedSong.videoID)) + } + } } // MARK: - Private Methods diff --git a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailView.swift b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailView.swift index f995728e2..1441a4af1 100644 --- a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailView.swift +++ b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailView.swift @@ -32,6 +32,7 @@ private protocol MusicDetailActionProtocol { var playlistButtonDidTap: Observable { get } var creditButtonDidTap: Observable { get } var dismissButtonDidTap: Observable { get } + var didTapArtistLabel: Observable { get } } final class MusicDetailView: UIView { @@ -256,4 +257,5 @@ extension Reactive: MusicDetailActionProtocol where Base: MusicDetailView { var playlistButtonDidTap: Observable { base.musicToolbarView.rx.playlistButtonDidTap } var creditButtonDidTap: Observable { base.creditButton.rx.tap.asObservable() } var dismissButtonDidTap: Observable { base.dismissButton.rx.tap.asObservable() } + var didTapArtistLabel: Observable { base.musicControlView.rx.didTapArtistLabel } } diff --git a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift index 7cefcb4c3..ee0733d72 100644 --- a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift +++ b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift @@ -1,3 +1,4 @@ +import ArtistFeatureInterface import BaseFeature import BaseFeatureInterface import DesignSystem @@ -20,6 +21,7 @@ final class MusicDetailViewController: BaseReactorViewController { get } var singingRoomButtonDidTap: Observable { get } var lyricsButtonDidTap: Observable { get } + var didTapArtistLabel: Observable { get } } final class MusicControlView: UIView { @@ -28,7 +30,7 @@ final class MusicControlView: UIView { textColor: DesignSystemAsset.BlueGrayColor.gray25.color, font: .t4(weight: .medium) ) - private let artistLabel: WMFlowLabel = WMFlowLabel( + fileprivate let artistLabel: WMFlowLabel = WMFlowLabel( text: "", textColor: DesignSystemAsset.BlueGrayColor.gray100.color.withAlphaComponent(0.6), font: .t5(weight: .medium) @@ -214,4 +216,11 @@ extension Reactive: MusicControlActionProtocol where Base: MusicControlView { var lyricsButtonDidTap: Observable { base.lyricsRoomButton.rx.tap.asObservable() } + + var didTapArtistLabel: Observable { + base.artistLabel.rx.tapGesture() + .when(.recognized) + .map { _ in () } + .asObservable() + } } diff --git a/Projects/Modules/Utility/Sources/Utils/UniquedSequence.swift b/Projects/Modules/Utility/Sources/Utils/UniquedSequence.swift index 1616cc018..9e2ac759d 100644 --- a/Projects/Modules/Utility/Sources/Utils/UniquedSequence.swift +++ b/Projects/Modules/Utility/Sources/Utils/UniquedSequence.swift @@ -52,3 +52,9 @@ extension UniquedSequence: Sequence { } extension UniquedSequence: LazySequenceProtocol where Base: LazySequenceProtocol {} + +public extension UniquedSequence { + func toArray() -> [Base.Element] { + Array(self) + } +} From e54cc0579f52c9f6e41b840473b250ccf4760f2a Mon Sep 17 00:00:00 2001 From: baegteun Date: Mon, 28 Oct 2024 22:46:27 +0900 Subject: [PATCH 2/6] :green_heart: :: [#1316] Mocking --- .../UseCase/FindArtistIDUseCaseSpy.swift | 11 +++++++++++ .../Demo/Sources/AppDelegate.swift | 19 +++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 Projects/Domains/ArtistDomain/Testing/UseCase/FindArtistIDUseCaseSpy.swift diff --git a/Projects/Domains/ArtistDomain/Testing/UseCase/FindArtistIDUseCaseSpy.swift b/Projects/Domains/ArtistDomain/Testing/UseCase/FindArtistIDUseCaseSpy.swift new file mode 100644 index 000000000..e494f4e73 --- /dev/null +++ b/Projects/Domains/ArtistDomain/Testing/UseCase/FindArtistIDUseCaseSpy.swift @@ -0,0 +1,11 @@ +import ArtistDomainInterface +import RxSwift + +public final class FindArtistIDUseCaseSpy: FindArtistIDUseCase { + public private(set) var callCount = 0 + public var handler: (() -> Single) = { .never() } + public func execute(name: String) -> Single { + callCount += 1 + return handler() + } +} diff --git a/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift b/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift index 944f0a847..d580ce033 100644 --- a/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift +++ b/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift @@ -1,10 +1,12 @@ +@testable import ArtistDomainTesting +import ArtistFeatureInterface import BaseFeature import BaseFeatureInterface import Inject import LikeDomainInterface +@testable import MusicDetailFeature import LikeDomainTesting import LyricHighlightingFeatureInterface -@testable import MusicDetailFeature import MusicDetailFeatureInterface import RxSwift import SignInFeatureInterface @@ -48,6 +50,11 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { .just(.init(status: "", likes: 0)) } + let findArtistIDUseCase = FindArtistIDUseCaseSpy() + findArtistIDUseCase.handler = { _ in + .just("fgSXAKsq-Vo") + } + let reactor = MusicDetailReactor( songIDs: [ "fgSXAKsq-Vo", @@ -58,7 +65,8 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { selectedID: "DPEtmqvaKqY", fetchSongUseCase: fetchSongUseCase, addLikeSongUseCase: addLikeSongUseCase, - cancelLikeSongUseCase: cancelLikeSongUseCase + cancelLikeSongUseCase: cancelLikeSongUseCase, + findArtistIDUseCase: findArtistIDUseCase ) let viewController = Inject.ViewControllerHost( UINavigationController( @@ -70,6 +78,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { containSongsFactory: DummyContainSongsFactory(), textPopupFactory: DummyTextPopupFactory(), karaokeFactory: DummyKaraokeFactory(), + artistDetailFactory: DummyArtistDetailFactory(), playlistPresenterGlobalState: DummyPlaylistPresenterGlobalState() ) ) @@ -129,3 +138,9 @@ final class DummyKaraokeFactory: KaraokeFactory { UIViewController() } } + +final class DummyArtistDetailFactory: ArtistDetailFactory { + func makeViewController(artistID: String) -> UIViewController { + UIViewController() + } +} From 3b9fb30215b22371059ce6036e94ea5861463130 Mon Sep 17 00:00:00 2001 From: baegteun Date: Mon, 28 Oct 2024 22:46:30 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=8E=A8=20::=20=EC=BD=94=EB=93=9C=20Fo?= =?UTF-8?q?rmatting=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift b/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift index d580ce033..cb34ab006 100644 --- a/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift +++ b/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift @@ -4,9 +4,9 @@ import BaseFeature import BaseFeatureInterface import Inject import LikeDomainInterface -@testable import MusicDetailFeature import LikeDomainTesting import LyricHighlightingFeatureInterface +@testable import MusicDetailFeature import MusicDetailFeatureInterface import RxSwift import SignInFeatureInterface From 0fb8a692892370a90b045f1f8e5bd9ca4d0da9a9 Mon Sep 17 00:00:00 2001 From: baegteun Date: Mon, 28 Oct 2024 23:03:51 +0900 Subject: [PATCH 4/6] =?UTF-8?q?:pencil:=20::=20[#1316]=20=EC=98=A4?= =?UTF-8?q?=ED=83=88=EC=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift b/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift index cb34ab006..ebbcf1b78 100644 --- a/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift +++ b/Projects/Features/MusicDetailFeature/Demo/Sources/AppDelegate.swift @@ -140,7 +140,7 @@ final class DummyKaraokeFactory: KaraokeFactory { } final class DummyArtistDetailFactory: ArtistDetailFactory { - func makeViewController(artistID: String) -> UIViewController { + func makeView(artistID: String) -> UIViewController { UIViewController() } } From 5273298033ee27f439b1c371609373b9c0249b2f Mon Sep 17 00:00:00 2001 From: baegteun Date: Mon, 28 Oct 2024 23:37:48 +0900 Subject: [PATCH 5/6] :children_crossing: :: [#1316] ArtistLabel throttle --- .../Sources/MusicDetail/MusicDetailViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift index ee0733d72..e98309206 100644 --- a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift +++ b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift @@ -224,6 +224,7 @@ final class MusicDetailViewController: BaseReactorViewController Date: Tue, 29 Oct 2024 21:12:03 +0900 Subject: [PATCH 6/6] :green_heart: :: [#1316] parameter --- .../ArtistDomain/Testing/UseCase/FindArtistIDUseCaseSpy.swift | 4 ++-- .../Sources/MusicDetail/MusicDetailViewController.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Projects/Domains/ArtistDomain/Testing/UseCase/FindArtistIDUseCaseSpy.swift b/Projects/Domains/ArtistDomain/Testing/UseCase/FindArtistIDUseCaseSpy.swift index e494f4e73..7a37e5016 100644 --- a/Projects/Domains/ArtistDomain/Testing/UseCase/FindArtistIDUseCaseSpy.swift +++ b/Projects/Domains/ArtistDomain/Testing/UseCase/FindArtistIDUseCaseSpy.swift @@ -3,9 +3,9 @@ import RxSwift public final class FindArtistIDUseCaseSpy: FindArtistIDUseCase { public private(set) var callCount = 0 - public var handler: (() -> Single) = { .never() } + public var handler: ((String) -> Single) = { _ in .never() } public func execute(name: String) -> Single { callCount += 1 - return handler() + return handler(name) } } diff --git a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift index e98309206..3fe2d8490 100644 --- a/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift +++ b/Projects/Features/MusicDetailFeature/Sources/MusicDetail/MusicDetailViewController.swift @@ -224,7 +224,7 @@ final class MusicDetailViewController: BaseReactorViewController