Skip to content

Commit 4b5431a

Browse files
GomHyeokgithub-actions[bot]
authored andcommitted
[Auto] Run swift-format
1 parent 6249937 commit 4b5431a

File tree

14 files changed

+69
-51
lines changed

14 files changed

+69
-51
lines changed

App/Sources/AppDependencyHandler.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import Foundation
1111
import History
1212
import Home
1313
import Lib
14+
import Onboarding
1415
import Setting
1516
import UIKit
16-
import Onboarding
1717

1818
struct AppDependencyHandler: DependencyRegistrable {
1919
func register(to dependencyHandler: DependencyHandler) {
@@ -22,7 +22,7 @@ struct AppDependencyHandler: DependencyRegistrable {
2222
self.configureTabBarController()
2323
}
2424
}
25-
25+
2626
dependencyHandler.register(key: DependencyKey.App.moveToSplashViewController) {
2727
Task { @MainActor in
2828
self.moveToSplashViewController()
@@ -45,7 +45,7 @@ struct AppDependencyHandler: DependencyRegistrable {
4545
]
4646
UIApplication.shared.activeWindow?.rootViewController = tabBarController
4747
}
48-
48+
4949
private func moveToSplashViewController() {
5050
let router = OnboardingRouter()
5151
let splashViewController = SplashViewcontroller(viewModel: SplashViewModel(), router: router)
@@ -56,7 +56,6 @@ struct AppDependencyHandler: DependencyRegistrable {
5656
}
5757
}
5858

59-
6059
extension UIApplication {
6160
fileprivate var activeWindow: UIWindow? {
6261
return

Common/Auth/Sources/UserDataManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public final class UserDataManager {
6666
throw error
6767
}
6868
}
69-
69+
7070
public func delete() async throws {
7171
do {
7272
try deviceUUIDManager.deleteUUID()

Common/Base/Sources/BaseViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ extension BaseViewController {
130130

131131
extension BaseViewController {
132132
public func showErrorPopup(action: @escaping () -> Void) {
133-
errorPopup.update(popUpModel: PopUpModel(title: "문제가 발생하였소", description: "잠시 후 다시 시도해 주시오.", actionButtonTitle: "확인", outButtonTitle: "취소"))
133+
errorPopup.update(
134+
popUpModel: PopUpModel(
135+
title: "문제가 발생하였소", description: "잠시 후 다시 시도해 주시오.", actionButtonTitle: "확인",
136+
outButtonTitle: "취소"))
134137
errorPopup.update(style: .one)
135138
errorPopup.isHidden = false
136139

DesignSystem/DesignSystem/Sources/PopUp.swift

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ public struct PopUpModel {
1414
let description: String?
1515
let actionButtonTitle: String
1616
let outButtonTitle: String
17-
18-
public init(title: String, description: String?, actionButtonTitle: String, outButtonTitle: String) {
17+
18+
public init(
19+
title: String, description: String?, actionButtonTitle: String, outButtonTitle: String
20+
) {
1921
self.title = title
2022
self.description = description
2123
self.actionButtonTitle = actionButtonTitle
2224
self.outButtonTitle = outButtonTitle
2325
}
24-
26+
2527
public init(title: String, actionButtonTitle: String, outButtonTitle: String) {
2628
self.title = title
2729
self.description = nil
@@ -157,12 +159,16 @@ public final class PopUp: UIView {
157159
}
158160

159161
let popup = PopUp().then {
160-
$0.update(popUpModel : PopUpModel(title: "제목", description: "설명 텍스트입니다.", actionButtonTitle: "확인", outButtonTitle: "취소"))
162+
$0.update(
163+
popUpModel: PopUpModel(
164+
title: "제목", description: "설명 텍스트입니다.", actionButtonTitle: "확인", outButtonTitle: "취소"))
161165
$0.update(style: .one)
162166
}
163167

164168
let popupTwo = PopUp().then {
165-
$0.update(popUpModel : PopUpModel(title: "제목", description: "설명 텍스트입니다.", actionButtonTitle: "확인", outButtonTitle: "취소"))
169+
$0.update(
170+
popUpModel: PopUpModel(
171+
title: "제목", description: "설명 텍스트입니다.", actionButtonTitle: "확인", outButtonTitle: "취소"))
166172
$0.update(style: .two)
167173
}
168174

Feature/Home/Sources/Home/HomeViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public final class HomeViewController: BaseViewController {
8787
self?.collectionView.reloadData()
8888
}
8989
.store(in: &cancellables)
90-
90+
9191
viewModel.output.showError
9292
.receive(on: DispatchQueue.main)
9393
.sink { [weak self] retryAction in

Feature/Home/Sources/Home/HomeViewModel.swift

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public final class HomeViewModel {
2222
struct Output {
2323
let isLoading = CurrentValueSubject<Bool, Never>(false)
2424
let sections = CurrentValueSubject<[any HomeCellModel], Never>([])
25-
let showError = PassthroughSubject<()->Void, Never>()
25+
let showError = PassthroughSubject<() -> Void, Never>()
2626
}
2727

2828
@Injected var homeService: HomeService
@@ -77,7 +77,7 @@ public final class HomeViewModel {
7777
to: HomeRoute.lottoResult, how: .push(hidesBottomBarWhenPushed: true),
7878
with: ["round": homeService.round as Any])
7979
}
80-
80+
8181
fetchResult()
8282
}
8383
}
@@ -93,7 +93,7 @@ extension HomeViewModel {
9393
output.sections.send(sections)
9494
} catch {
9595
output.isLoading.send(false)
96-
output.showError.send {[weak self] in
96+
output.showError.send { [weak self] in
9797
guard let self else { return }
9898
self.fetch()
9999
}
@@ -110,27 +110,29 @@ extension HomeViewModel {
110110
output.sections.send(sections)
111111
} catch {
112112
output.isLoading.send(false)
113-
output.showError.send {[weak self] in
113+
output.showError.send { [weak self] in
114114
guard let self else { return }
115115
self.fetchRecommendation()
116116
}
117117
}
118118
output.isLoading.send(false)
119119
}
120120
}
121-
121+
122122
fileprivate func fetchResult() {
123123
let name = userDataManager.user?.name ?? ""
124-
var sections : [any HomeCellModel] = []
125-
124+
var sections: [any HomeCellModel] = []
125+
126126
output.sections.value.forEach { section in
127-
if let _ = section as? HomeRecommendationCollectionViewCellModel {
128-
sections.append(HomeRecommendationCollectionViewCellModel(title: "\(name)님을 위한 로또 번호 추천", state: .needsRecommendation))
127+
if section as? HomeRecommendationCollectionViewCellModel != nil {
128+
sections.append(
129+
HomeRecommendationCollectionViewCellModel(
130+
title: "\(name)님을 위한 로또 번호 추천", state: .needsRecommendation))
129131
} else {
130132
sections.append(section)
131133
}
132134
}
133-
135+
134136
output.sections.send(sections)
135137
}
136138
}

Feature/Home/Sources/LottoResult/LottoResultViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ final class LottoResultViewController: BaseViewController {
152152
}
153153
}
154154
.store(in: &cancellables)
155-
155+
156156
viewModel.output.showError
157157
.receive(on: DispatchQueue.main)
158158
.sink { [weak self] retryAction in

Feature/Home/Sources/LottoResult/LottoResultViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class LottoResultViewModel {
2424
let isLoading = CurrentValueSubject<Bool, Never>(true)
2525
let back = PassthroughSubject<Void, Never>()
2626
let popToRoot = PassthroughSubject<Void, Never>()
27-
let showError = PassthroughSubject<()->Void, Never>()
27+
let showError = PassthroughSubject<() -> Void, Never>()
2828
}
2929

3030
@Injected var lottoResultService: LottoResultService
@@ -49,7 +49,7 @@ final class LottoResultViewModel {
4949
output.isLoading.send(false)
5050
} catch {
5151
output.isLoading.send(false)
52-
output.showError.send {[weak self] in
52+
output.showError.send { [weak self] in
5353
self?.send(input: .viewDidLoad)
5454
}
5555
// TODO: 에러 처리

Feature/Onboarding/Sources/Onboarding/OnboardingViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class OnboardingViewModel {
3232
let isBornTimeButtonEnabled: PassthroughSubject<Bool, Never> = .init()
3333
let navigate: PassthroughSubject<OnboardingRoute, Never> = .init()
3434
let back: PassthroughSubject<Void, Never> = .init()
35-
let showError : PassthroughSubject<()->Void, Never> = .init()
35+
let showError: PassthroughSubject<() -> Void, Never> = .init()
3636
}
3737

3838
let output: Output = Output()

Feature/Onboarding/Sources/Onboarding/OnboardingViewcontroller.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ extension OnboardingViewController {
356356
self.bornTimeSetButton.isEnabled = isEnable
357357
}
358358
.store(in: &store)
359-
359+
360360
viewModel.output.showError
361361
.receive(on: DispatchQueue.main)
362362
.sink { [weak self] retryAction in

0 commit comments

Comments
 (0)