mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 06:33:42 +00:00
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
29 lines
684 B
Swift
29 lines
684 B
Swift
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()
|
|
}
|
|
}
|