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.

43 lines
939 B

  1. //
  2. // GmeContactsPresenter.swift
  3. // GMERemittance
  4. //
  5. // Created by gme_2 on 25/08/2018.
  6. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. class GmeContactsPresenter {
  10. // MARK: Properties
  11. weak var view: GmeContactsViewInterface?
  12. var interactor: GmeContactsInteractorInput?
  13. var wireframe: GmeContactsWireframeInput?
  14. // MARK: Converting entities
  15. }
  16. // MARK: GmeContacts module interface
  17. extension GmeContactsPresenter: GmeContactsModuleInterface {
  18. func fetchBranch() {
  19. view?.startLoading()
  20. interactor?.fetchBranches()
  21. }
  22. }
  23. // MARK: GmeContacts interactor output interface
  24. extension GmeContactsPresenter: GmeContactsInteractorOutput {
  25. func setBranchModel(with model: [Branch]?) {
  26. view?.endLoading()
  27. view?.setBranchModel(with: model)
  28. }
  29. func setBranchesError(with error: Error) {
  30. view?.endLoading()
  31. view?.setBranchesError(with: error)
  32. }
  33. }