Skip to content

Commit 2b66ed7

Browse files
committed
[BOOK-284] fix: remove unnecessary or risky code
1 parent aff28fb commit 2b66ed7

5 files changed

Lines changed: 12 additions & 6 deletions

File tree

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
// Copyright © 2025 Booket. All rights reserved
22

3+
import BKCore
34
import UIKit
45

56
struct AppStoreLinker {
67
private static let appID = "6747740414"
78

89
static func openAppStore() {
910
guard let url = URL(string: "itms-apps://itunes.apple.com/app/id\(appID)") else {
10-
print("Invalid App Store URL")
11+
Log.debug("Invalid App Store URL", logger: AppLogger.network)
1112
return
1213
}
1314

1415
if UIApplication.shared.canOpenURL(url) {
1516
UIApplication.shared.open(url)
1617
} else {
17-
print("Can't open App Store URL")
18+
Log.debug("Can't open App Store URL", logger: AppLogger.network)
1819
}
1920
}
2021
}

src/Projects/BKPresentation/Sources/Common/Extension/UINavigationController+.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private extension UINavigationController {
185185

186186
func makeHomeTitleView(_ text: String) -> UIView {
187187
let label = BKLabel()
188-
let font = BKTextStyle.title1(weight: .bold).uiFont!
188+
let font = BKTextStyle.title1(weight: .bold).uiFont ?? UIFont.systemFont(ofSize: 28, weight: .bold)
189189
let attr = NSMutableAttributedString(string: text, attributes: [
190190
.font: font,
191191
.foregroundColor: UIColor.bkContentColor(.brand)
@@ -204,7 +204,7 @@ private extension UINavigationController {
204204

205205
func makeLeadingTitle(_ text: String) -> UIView {
206206
let label = BKLabel()
207-
let font = BKTextStyle.heading1(weight: .bold).uiFont!
207+
let font = BKTextStyle.heading1(weight: .bold).uiFont ?? UIFont.systemFont(ofSize: 22, weight: .bold)
208208
let attr = NSMutableAttributedString(string: text, attributes: [
209209
.font: font,
210210
.foregroundColor: UIColor.bkContentColor(.primary)
@@ -267,7 +267,7 @@ private extension UINavigationController {
267267

268268
let backImage = BKImage.Icon.chevronLeft
269269
.withRenderingMode(.alwaysTemplate)
270-
.imageWithOffset(x: -4, y: 2)!
270+
.imageWithOffset(x: -4, y: 2) ?? BKImage.Icon.chevronLeft
271271
.withAlignmentRectInsets(
272272
UIEdgeInsets(top: 0, left: -16, bottom: 0, right: 0)
273273
)

src/Projects/BKPresentation/Sources/MainFlow/Note/View/NoteViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ final class NoteViewController: BaseViewController<NoteView> {
4646
override func viewWillDisappear(_ animated: Bool) {
4747
super.viewWillDisappear(animated)
4848
self.tabBarController?.tabBar.isHidden = false
49+
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
4950
}
5051

5152
override func bindAction() {

src/Projects/BKPresentation/Sources/MainFlow/Search/View/SearchView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ private extension SearchView {
128128
collectionView.backgroundColor = .bkBaseColor(.primary)
129129
collectionView.delegate = self
130130
collectionView.alwaysBounceVertical = false
131+
collectionView.contentInset = .zero
132+
collectionView.scrollIndicatorInsets = .zero
131133
collectionView.register(RecentKeywordCell.self, forCellWithReuseIdentifier: RecentKeywordCell.identifier)
132134
collectionView.register(SearchResultCell.self, forCellWithReuseIdentifier: SearchResultCell.identifier)
133135

@@ -248,7 +250,9 @@ private extension SearchView {
248250
let layout = UICollectionViewFlowLayout()
249251
layout.scrollDirection = .vertical
250252
layout.minimumLineSpacing = .zero
253+
layout.minimumInteritemSpacing = .zero
251254
layout.sectionInset = .zero
255+
layout.estimatedItemSize = .zero // 정확한 사이즈 계산을 위해 추가
252256
return layout
253257
}
254258

src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ final class SettingViewModel: BaseViewModel {
155155
return appVersionUseCase.executeRecentVersion()
156156
.map { Action.fetchLatestAppVersionSucceeded($0) }
157157
.catch { error -> Just<Action> in
158-
print("Failed to fetch latest app version: \(error)")
158+
Log.debug("Failed to fetch latest app version: \(error)", logger: AppLogger.viewModel)
159159
return Just(Action.fetchLatestAppVersionSucceeded(""))
160160
}
161161
.eraseToAnyPublisher()

0 commit comments

Comments
 (0)