Skip to content

Commit 8c73914

Browse files
committed
Merge branch 'develop' of https://github.com/engingulek/ICTMDBHomeModule into develop
# Conflicts: # .DS_Store
2 parents 3e01ca2 + 9d0e85b commit 8c73914

24 files changed

Lines changed: 139 additions & 128 deletions

.DS_Store

8 KB
Binary file not shown.

.swiftlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
disabled_rules:
2+
- trailing_whitespace

.swiftpm/.DS_Store

6 KB
Binary file not shown.

.swiftpm/xcode/.DS_Store

6 KB
Binary file not shown.

ICTMDBHomeModule/.DS_Store

6 KB
Binary file not shown.

ICTMDBHomeModule/Enums.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ enum CellItemType {
1111
case none
1212
}
1313

14-
//MARK: SectionType
14+
// MARK: SectionType
1515
enum SectionType: Int, CaseIterable {
1616
case popular
1717
case airingToday
1818
}
1919

20-
21-
//MARK: HomePageErrorType
20+
// MARK: HomePageErrorType
2221
enum HomePageErrorType {
2322
case popular
2423
case airingToday

ICTMDBHomeModule/HomeInteractor.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
import Foundation
99
import ICTMDBNetworkManagerKit
1010

11-
12-
final class HomeInteractor: PresenterToInteractorHomeProtocol,@unchecked Sendable {
11+
final class HomeInteractor: PresenterToInteractorHomeProtocol, @unchecked Sendable {
1312

1413
// MARK: - Properties
1514

ICTMDBHomeModule/HomePresenter.swift

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ final class HomePresenter {
3636
/// List of airing today shows for UI display
3737
private var airingTodayShows: [AiringTodayPresentation] = []
3838

39-
4039
// MARK: - Init
4140
init(view: PresenterToViewHomeProtocol?,
4241
interactor: PresenterToInteractorHomeProtocol,
@@ -52,14 +51,11 @@ final class HomePresenter {
5251
}
5352
}
5453

55-
5654
// MARK: - ViewToPresenterHomeProtocol
5755
/// Handles actions triggered by the View layer.
5856
@MainActor
5957
extension HomePresenter: ViewToPresenterHomeProtocol {
6058

61-
62-
6359
func viewDidLoad() {
6460
view?.setBackColorAble(color: "backColor")
6561
view?.setNavigationTitle(title: LocalizableUI.homePageNavTitle.localized)
@@ -69,19 +65,14 @@ extension HomePresenter: ViewToPresenterHomeProtocol {
6965
}
7066
}
7167

72-
73-
7468
func loadData() async {
7569
view?.startLoading()
7670
await interactor.loadData()
7771
view?.finishLoading()
7872
}
7973

80-
81-
8274
}
8375

84-
8576
// MARK: - CollectionViewSources
8677
/// Provides collection view data, layout, and interaction logic.
8778
extension HomePresenter {
@@ -106,7 +97,6 @@ extension HomePresenter {
10697
}
10798
}
10899

109-
110100
func numberOfSections() -> Int {
111101
SectionType.allCases.count
112102
}
@@ -123,7 +113,6 @@ extension HomePresenter {
123113
}
124114
}
125115

126-
127116
func didSelectItem(section: Int, item: Int) {
128117
guard let sectionType = SectionType(rawValue: section) else { return }
129118
switch sectionType {
@@ -137,7 +126,7 @@ extension HomePresenter {
137126
}
138127

139128
func titleForSection(at section: Int) -> GenericCollectionViewKit.HeaderViewItem {
140-
var headerViewItem:HeaderViewItem
129+
var headerViewItem: HeaderViewItem
141130
guard let sectionType = SectionType(rawValue: section) else {
142131
headerViewItem = .init(title: "", sizeType: .empty)
143132
return headerViewItem
@@ -160,7 +149,6 @@ extension HomePresenter {
160149
return headerViewItem
161150
}
162151

163-
164152
func onTappedTitleButton(buttonType: TitleForSectionButtonType, section: Int) {
165153
guard let sectionType = SectionType(rawValue: section) else { return }
166154

@@ -196,7 +184,6 @@ extension HomePresenter {
196184
}
197185
}
198186

199-
200187
// MARK: - InteractorToPresenterHomeProtocol
201188
/// Receives data from the Interactor and updates the view.
202189
extension HomePresenter: InteractorToPresenterHomeProtocol {
@@ -219,4 +206,3 @@ extension HomePresenter: InteractorToPresenterHomeProtocol {
219206
}
220207

221208
}
222-

ICTMDBHomeModule/HomeProtocols.swift

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
import ICTMDBViewKit
99
import GenericCollectionViewKit
10-
11-
1210
import UIKit
1311

1412
// MARK: - Typealias
@@ -51,7 +49,7 @@ protocol PresenterToViewHomeProtocol: AnyObject, Ables {
5149
// MARK: - Presenter → Interactor
5250
/// Protocol defining communication from Presenter to Interactor.
5351

54-
protocol PresenterToInteractorHomeProtocol:Sendable,AnyObject {
52+
protocol PresenterToInteractorHomeProtocol: Sendable, AnyObject {
5553

5654
/// Reference to the Presenter layer
5755
var presenter: InteractorToPresenterHomeProtocol? { get set }
@@ -60,12 +58,11 @@ protocol PresenterToInteractorHomeProtocol:Sendable,AnyObject {
6058
func loadData() async
6159
}
6260

63-
6461
// MARK: - Interactor → Presenter
6562
/// Protocol for sending data or errors from Interactor to Presenter.
66-
protocol InteractorToPresenterHomeProtocol : AnyObject{
63+
protocol InteractorToPresenterHomeProtocol: AnyObject {
6764

68-
func sendData(popular:[PopularTvShows],airingToday:[AiringToday])
65+
func sendData(popular: [PopularTvShows], airingToday: [AiringToday])
6966

7067
/// Sends an error state
7168
func sendError()
@@ -83,6 +80,3 @@ protocol PresenterToRouterHomeProtocol {
8380
/// Navigates to Detail page
8481
func toDetailPage(view: PresenterToViewHomeProtocol?, id: Int?)
8582
}
86-
87-
88-

ICTMDBHomeModule/HomeRouter.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ import ICTMDBModularProtocols
1010
import DependencyKit
1111
import ICTMDBViewKit
1212

13-
import UIKit
14-
1513
/// `HomeRouter` is responsible for navigation in the Home module.
16-
public class HomeRouter: PresenterToRouterHomeProtocol {
14+
public class HomeRouter: PresenterToRouterHomeProtocol {
1715

1816
// MARK: - Navigation to All List Page
1917

0 commit comments

Comments
 (0)