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.
53 lines
1.4 KiB
53 lines
1.4 KiB
//
|
|
// MessageComposePresenter.swift
|
|
// GMERemittance
|
|
//
|
|
// Created by gme_2 on 02/10/2018.
|
|
//Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class MessageComposePresenter {
|
|
|
|
// MARK: Properties
|
|
|
|
weak var view: MessageComposeViewInterface?
|
|
var interactor: MessageComposeInteractorInput?
|
|
var wireframe: MessageComposeWireframeInput?
|
|
|
|
// MARK: Converting entities
|
|
}
|
|
|
|
// MARK: MessageCompose module interface
|
|
|
|
extension MessageComposePresenter: MessageComposeModuleInterface {
|
|
func cancel(control: String, transId: String, subject: String, body: String) {
|
|
self.interactor?.cancel(control: control, transId: transId, subject: subject, body: body)
|
|
}
|
|
|
|
func edit(control: String, transId: String, subject: String, body: String) {
|
|
self.interactor?.edit(control: control, transId: transId, subject: subject, body: body)
|
|
}
|
|
|
|
func pending(control: String, transId: String, subject: String, body: String) {
|
|
self.interactor?.pending(control: control, transId: transId, subject: subject, body: body)
|
|
}
|
|
|
|
func dismiss() {
|
|
self.wireframe?.dismiss()
|
|
}
|
|
}
|
|
|
|
// MARK: MessageCompose interactor output interface
|
|
|
|
extension MessageComposePresenter: MessageComposeInteractorOutput {
|
|
|
|
func show(error: Error) {
|
|
self.view?.show(error: error.localizedDescription)
|
|
}
|
|
|
|
func show(model: SuccessMessage) {
|
|
self.view?.show(model: model)
|
|
}
|
|
}
|