You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// // HomePresenter.swift // GMERemittance // // Created by gme_2 on 21/09/2018. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. //
import Foundation
class HomePresenter { // MARK: Properties weak var view: HomeViewInterface? var interactor: HomeInteractorInput? var wireframe: HomeWireframeInput?
// MARK: Converting entities }
// MARK: Home module interface
extension HomePresenter: HomeModuleInterface { func openTransactionHistory() { wireframe?.openTransactionHistory() } func openTodaysRate() { wireframe?.openTodaysRate() } func openTrackYourTransfer() { wireframe?.openTrackYourTransfer() } func openSendMoney() { wireframe?.openSendMoney() } func showAppUpdate() { wireframe?.showAppUpdate() } func showKyc() { self.wireframe?.openKyc() } func showPennyTest() { self.wireframe?.showPennyTest() } func showPennyTestSubmit() { self.wireframe?.showPennyTestSubmit() } func refreshData() { self.interactor?.fetchUserInfo() } func viewIsReady() { self.view?.showLoading() self.interactor?.fetchUserInfo() } func logout() { wireframe?.logOut() } }
// MARK: Home interactor output interface
extension HomePresenter: HomeInteractorOutput { func show(model: User) { self.view?.endRefreshing() self.view?.hideLoading() self.view?.show(model: model) } func show(error: Error) { self.view?.endRefreshing() self.view?.show(error: error.localizedDescription) } func show(panicError: Error) { self.view?.hideLoading() self.view?.show(panicError: panicError.localizedDescription) } }
|