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

πŸ”€ :: μ΅œμ‹  μŒμ•… 상세 ν™”λ©΄ μΆ”κ°€ #389

Merged
merged 8 commits into from
Nov 16, 2023
13 changes: 11 additions & 2 deletions Projects/App/Sources/Application/AppComponent+Songs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import DataModule
import NetworkModule
import SearchFeature
import HomeFeature
import CommonFeature

public extension AppComponent {

Expand All @@ -29,6 +30,14 @@ public extension AppComponent {
var homeComponent: HomeComponent {
HomeComponent(parent: self)
}

var newSongsComponent: NewSongsComponent {
NewSongsComponent(parent: self)
}

var newSongsContentComponent: NewSongsContentComponent {
NewSongsContentComponent(parent: self)
}

var remoteSongsDataSource: any RemoteSongsDataSource {
shared {
Expand All @@ -53,9 +62,9 @@ public extension AppComponent {
}
}

var fetchNewSongUseCase: any FetchNewSongUseCase {
var fetchNewSongsUseCase: any FetchNewSongsUseCase {
shared {
FetchNewSongUseCaseImpl(songsRepository: songsRepository)
FetchNewSongsUseCaseImpl(songsRepository: songsRepository)
}
}
}
15 changes: 10 additions & 5 deletions Projects/App/Sources/Application/AppComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@ public final class AppComponent: BootstrapComponent {
public func makeRootView() -> IntroViewController {
rootComponent.makeView()
}

public var keychain: any Keychain {
shared {
KeychainImpl()
}
}


var rootComponent: RootComponent {
shared {
RootComponent(parent: self)
}
}

var permissionComponent: PermissionComponent {
shared {
PermissionComponent(parent: self)
}
}

}

// MARK: - Tabbar
Expand Down Expand Up @@ -64,4 +63,10 @@ public extension AppComponent {
var serviceInfoComponent: ServiceInfoComponent {
ServiceInfoComponent(parent: self)
}

var permissionComponent: PermissionComponent {
shared {
PermissionComponent(parent: self)
}
}
}
267 changes: 160 additions & 107 deletions Projects/App/Sources/Application/NeedleGenerated.swift

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Projects/App/Support/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@
<string>$(WMDOMAIN_QNA)</string>
<key>WMDOMAIN_SONGS</key>
<string>$(WMDOMAIN_SONGS)</string>
<key>WMDOMAIN_V2_SONGS</key>
<string>$(WMDOMAIN_V2_SONGS)</string>
<key>WMDOMAIN_SUGGEST</key>
<string>$(WMDOMAIN_SUGGEST)</string>
<key>WMDOMAIN_USER</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ public final class ArtistViewController: BaseViewController, ViewControllerFromS

public override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
navigationController?.interactivePopGestureRecognizer?.delegate = self
}

public override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
navigationController?.interactivePopGestureRecognizer?.delegate = nil
}

public static func viewController(
viewModel: ArtistViewModel,
artistDetailComponent: ArtistDetailComponent
Expand Down Expand Up @@ -131,3 +136,9 @@ extension ArtistViewController {
}
}
}

extension ArtistViewController: UIGestureRecognizerDelegate {
public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
return false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ extension ChartContentViewController {
let height: CGFloat = space / 3 * 2
let warningView: WarningView = WarningView(frame: CGRect(x: 0, y: 0, width: APP_WIDTH(), height: height))
warningView.text = "차트 데이터가 μ—†μŠ΅λ‹ˆλ‹€."
self.tableView.tableFooterView = model.isEmpty ? warningView : nil
self.tableView.tableFooterView = model.isEmpty ? warningView : UIView(frame: CGRect(x: 0, y: 0, width: APP_WIDTH(), height: PLAYER_HEIGHT()))
})
.bind(to: tableView.rx.items) { [weak self] (tableView, index, model) -> UITableViewCell in
guard let self else { return UITableViewCell() }
Expand Down Expand Up @@ -131,8 +131,8 @@ extension ChartContentViewController {
self.activityIncidator.type = .circleStrokeSpin
self.activityIncidator.color = DesignSystemAsset.PrimaryColor.point.color
self.activityIncidator.startAnimating()
self.tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: APP_WIDTH(), height: 56))
self.tableView.scrollIndicatorInsets = UIEdgeInsets(top: 0, left: 0, bottom: 56, right: 0)
self.tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: APP_WIDTH(), height: PLAYER_HEIGHT()))
self.tableView.scrollIndicatorInsets = UIEdgeInsets(top: 0, left: 0, bottom: PLAYER_HEIGHT(), right: 0)
self.tableView.refreshControl = refreshControl
}
}
Expand Down
200 changes: 197 additions & 3 deletions Projects/Features/CommonFeature/Resources/CommonUI.storyboard

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Foundation
import NeedleFoundation
import DomainModule

public protocol NewSongsDependency: Dependency {
var newSongsContentComponent: NewSongsContentComponent { get }
}

public final class NewSongsComponent: Component<NewSongsDependency> {
public func makeView() -> NewSongsViewController {
return NewSongsViewController.viewController(newSongsContentComponent: dependency.newSongsContentComponent)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// NewSongsContentComponent.swift
// CommonFeature
//
// Created by KTH on 2023/11/15.
// Copyright Β© 2023 yongbeomkwak. All rights reserved.
//

import Foundation
import NeedleFoundation
import DomainModule
import DataMappingModule

public protocol NewSongsContentDependency: Dependency {
var fetchNewSongsUseCase: any FetchNewSongsUseCase { get }
var fetchChartUpdateTimeUseCase: any FetchChartUpdateTimeUseCase { get }
var containSongsComponent: ContainSongsComponent { get }
}

public final class NewSongsContentComponent: Component<NewSongsContentDependency> {
public func makeView(type: NewSongGroupType) -> NewSongsContentViewController {
return NewSongsContentViewController.viewController(
viewModel: .init(
type: type,
fetchNewSongsUseCase: dependency.fetchNewSongsUseCase,
fetchChartUpdateTimeUseCase: dependency.fetchChartUpdateTimeUseCase
),
containSongsComponent: dependency.containSongsComponent
)
}
}
Loading
Loading