Skip to content

Commit d5c980f

Browse files
committed
debug
1 parent 1988e0a commit d5c980f

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

ICTMDBHomeModule/HomeInteractor.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,14 @@ final class HomeInteractor: PresenterToInteractorHomeProtocol,@unchecked Sendabl
3636
do {
3737
let (popularResult, airingResult) = try await (popularMovies, airingMovies)
3838

39-
await MainActor.run {
40-
presenter?.sendData(
39+
await presenter?.sendData(
4140
popular: popularResult.results,
4241
airingToday: airingResult.results)
4342

44-
}
43+
4544
} catch {
46-
await MainActor.run {
47-
presenter?.sendError()
48-
}
45+
await presenter?.sendError()
46+
4947
}
5048
}
5149
}

ICTMDBHomeModule/HomeProtocols.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ protocol PresenterToInteractorHomeProtocol:Sendable,AnyObject {
6363

6464
// MARK: - Interactor → Presenter
6565
/// Protocol for sending data or errors from Interactor to Presenter.
66+
@MainActor
6667
protocol InteractorToPresenterHomeProtocol : AnyObject{
6768

6869
func sendData(popular:[PopularTvShows],airingToday:[AiringToday])

0 commit comments

Comments
 (0)