pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
changeset 1664 7fa84db06f26
parent 1650 33eba5b4f5f5
child 1675 21f792356f97
     1.1 --- a/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Wed Feb 08 16:09:31 2017 +0100
     1.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Wed Feb 08 16:33:18 2017 +0100
     1.3 @@ -277,7 +277,7 @@
     1.4      func createForwardAction(cell: EmailListViewCell) -> UIAlertAction {
     1.5          return UIAlertAction(title: "Forward", style: .default) { (action) in
     1.6              //self.performSegue(withIdentifier: self.segueCompose, sender: cell)
     1.7 -            self.performSegue(withIdentifier: .segueCompose, sender: cell)
     1.8 +            self.performSegue(withIdentifier: .segueForward, sender: cell)
     1.9          }
    1.10      }
    1.11  
    1.12 @@ -320,6 +320,7 @@
    1.13          case segueShowEmail
    1.14          case segueCompose
    1.15          case segueReplyAll
    1.16 +        case segueForward
    1.17          case noSegue
    1.18      }
    1.19  
    1.20 @@ -355,6 +356,17 @@
    1.21                  vc.message = email
    1.22              }
    1.23              break
    1.24 +        case .segueForward:
    1.25 +            if let nav = segue.destination as? UINavigationController,
    1.26 +                let destination = nav.topViewController as? ComposeTableViewController,
    1.27 +                let cell = sender as? EmailListViewCell,
    1.28 +                let indexPath = self.tableView.indexPath(for: cell),
    1.29 +                let email = cell.messageAt(indexPath: indexPath, config: config) {
    1.30 +                destination.composeMode = .forward
    1.31 +                destination.appConfig = config?.appConfig
    1.32 +                destination.originalMessage = email
    1.33 +            }
    1.34 +            break
    1.35          default: ()
    1.36          }
    1.37      }