-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix] DIContainer 수정 및 소식 탭 앰플리튜드 태그 추가 #150
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
Changes from all commits
e73eb9d
575e53c
62ff143
8e1adcf
9ee6781
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||||||||||||||||||||||||||
| // | ||||||||||||||||||||||||||||||
| // AppDelegate+InjectDependency.swift | ||||||||||||||||||||||||||||||
| // Wable-iOS | ||||||||||||||||||||||||||||||
| // | ||||||||||||||||||||||||||||||
| // Created by 김진웅 on 3/29/25. | ||||||||||||||||||||||||||||||
| // | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| import Foundation | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| extension AppDelegate { | ||||||||||||||||||||||||||||||
| var diContainer: AppDIContainer { AppDIContainer.shared } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| func injectDependency() { | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| // TODO: 객체를 주입 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
Comment on lines
+13
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implement the TODO for dependency injection The method is currently empty with only a TODO comment. According to the PR description, this method should register all necessary dependencies at startup to avoid application crashes from unregistered dependencies. func injectDependency() {
- // TODO: 객체를 주입
+ // Register your dependencies here
+ // Example:
+ // diContainer.register(for: SomeService.self) { _ in
+ // SomeServiceImplementation()
+ // }
}📝 Committable suggestion
Suggested change
🧰 Tools🪛 SwiftLint (0.57.0)[Warning] 15-15: TODOs should be resolved (객체를 주입) (todo) |
||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,12 @@ final class OverviewPageViewController: UIViewController { | |
|
|
||
| // MARK: - Property | ||
|
|
||
| private var currentIndex = 0 | ||
| private var currentIndex = 0 { | ||
| didSet { | ||
| guard oldValue != currentIndex else { return } | ||
| trackPageChangeEvent(for: currentIndex) | ||
| } | ||
| } | ||
| private var viewControllers = [UIViewController]() | ||
|
|
||
| private let pageViewController = UIPageViewController( | ||
|
|
@@ -189,14 +194,27 @@ private extension OverviewPageViewController { | |
| } | ||
| } | ||
|
|
||
|
|
||
|
|
||
| // MARK: - Helper Method | ||
|
|
||
| private extension OverviewPageViewController { | ||
| func index(for viewController: UIViewController) -> Int? { | ||
| return viewControllers.firstIndex(of: viewController) | ||
| } | ||
|
|
||
| func trackPageChangeEvent(for index: Int) { | ||
| switch index { | ||
| case 0: | ||
| AmplitudeManager.shared.trackEvent(tag: "click_gameschedule") | ||
| case 1: | ||
| AmplitudeManager.shared.trackEvent(tag: "click_ranking") | ||
| case 2: | ||
| AmplitudeManager.shared.trackEvent(tag: "click_news") | ||
| case 3: | ||
| AmplitudeManager.shared.trackEvent(tag: "click_announcement") | ||
| default: | ||
| break | ||
| } | ||
| } | ||
|
Comment on lines
+204
to
+217
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💯 |
||
| } | ||
|
|
||
| // MARK: - Computed Property | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오... 보통 네이밍을 이런식으로 많이 짓나요? 처음 보는 네이밍이어서 여쭤봅니다요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어떻게 해야할 지 저도 몰라서 우선 저렇게 지어보었습니다. ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 ㅎㅎ 확인했습니닷