-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #209 from V1taS/feature/Artem_Pavlov/Create-a-seri…
…es-module Feature/artem pavlov/create a series module
- Loading branch information
Showing
27 changed files
with
1,133 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...Sources/Modules/MainScreen/SeriesScreenModule/Abstractions/SeriesScreenAbstractions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// SeriesScreenAbstractions.swift | ||
// Random | ||
// | ||
// Created by Artem Pavlov on 13.11.2023. | ||
// | ||
|
||
import FancyUIKit | ||
|
||
/// События которые отправляем из `SeriesScreenModule` в `Coordinator` | ||
public protocol SeriesScreenModuleOutput: AnyObject { | ||
|
||
/// Что-то пошло не так | ||
func somethingWentWrong() | ||
|
||
/// Проиграть трайлер по ссылке | ||
/// - Parameter url: Ссылка на трейлер | ||
func playTrailerActionWith(url: String) | ||
|
||
/// Модуль был закрыт | ||
func moduleClosed() | ||
} | ||
|
||
/// События которые отправляем из `Coordinator` в `SeriesScreenModule` | ||
public protocol SeriesScreenModuleInput { | ||
|
||
/// События которые отправляем из `SeriesScreenModule` в `Coordinator` | ||
var moduleOutput: SeriesScreenModuleOutput? { get set } | ||
} | ||
|
||
/// Готовый модуль `SeriesScreenModule` | ||
public typealias SeriesScreenModule = ViewController & SeriesScreenModuleInput |
31 changes: 31 additions & 0 deletions
31
Random/App/Sources/Modules/MainScreen/SeriesScreenModule/Assembly/SeriesScreenAssembly.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// SeriesScreenAssembly.swift | ||
// Random | ||
// | ||
// Created by Artem Pavlov on 13.11.2023. | ||
// | ||
|
||
import Foundation | ||
|
||
/// Сборщик `SeriesScreen` | ||
final class SeriesScreenAssembly { | ||
|
||
/// Собирает модуль `SeriesScreen` | ||
/// - Parameter services: Сервисы приложения | ||
/// - Returns: Cобранный модуль `SeriesScreen` | ||
func createModule(services: ApplicationServices) -> SeriesScreenModule { | ||
let view = SeriesScreenView() | ||
let factory = SeriesScreenFactory() | ||
let interactor = SeriesScreenInteractor(services: services, factory: factory) | ||
let presenter = SeriesScreenViewController( | ||
moduleView: view, | ||
interactor: interactor, | ||
factory: factory | ||
) | ||
|
||
view.output = presenter | ||
interactor.output = presenter | ||
factory.output = presenter | ||
return presenter | ||
} | ||
} |
Oops, something went wrong.