Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
|
|
@ -0,0 +1,28 @@
|
|||
protocol ElevationDetailsPresenterProtocol: AnyObject {
|
||||
func configure()
|
||||
func onOkButtonPressed()
|
||||
}
|
||||
|
||||
class ElevationDetailsPresenter {
|
||||
private weak var view: ElevationDetailsViewProtocol?
|
||||
private let router: ElevationDetailsRouterProtocol
|
||||
private let data: ElevationProfileData
|
||||
|
||||
init(view: ElevationDetailsViewProtocol,
|
||||
router: ElevationDetailsRouterProtocol,
|
||||
data: ElevationProfileData) {
|
||||
self.view = view
|
||||
self.router = router
|
||||
self.data = data
|
||||
}
|
||||
}
|
||||
|
||||
extension ElevationDetailsPresenter: ElevationDetailsPresenterProtocol {
|
||||
func configure() {
|
||||
view?.setDifficulty(data.difficulty)
|
||||
}
|
||||
|
||||
func onOkButtonPressed() {
|
||||
router.close()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue