pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
changeset 1694 898bb5eaa391
parent 1693 c4db2ce1f89b
child 1696 a95b55a243a3
equal deleted inserted replaced
1693:c4db2ce1f89b 1694:898bb5eaa391
   290 
   290 
   291     func filterContentForSearchText(searchText: String) {
   291     func filterContentForSearchText(searchText: String) {
   292 
   292 
   293     }
   293     }
   294 
   294 
   295     // MARK: - Actions
       
   296     //    @IBAction func unwindToEmailList(for unwindSegue: UIStoryboardSegue) {
       
   297     //
       
   298     //    }
       
   299 
       
   300 }
   295 }
   301 
   296 
   302 extension EmailListViewController: UISearchResultsUpdating, UISearchControllerDelegate {
   297 extension EmailListViewController: UISearchResultsUpdating, UISearchControllerDelegate {
   303     public func updateSearchResults(for searchController: UISearchController) {
   298     public func updateSearchResults(for searchController: UISearchController) {
   304         filterContentForSearchText(searchText: searchController.searchBar.text!)
   299         filterContentForSearchText(searchText: searchController.searchBar.text!)
   324         case noSegue
   319         case noSegue
   325     }
   320     }
   326 
   321 
   327     override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
   322     override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
   328         switch segueIdentifier(for: segue) {
   323         switch segueIdentifier(for: segue) {
   329         case .segueCompose:
       
   330             //let destination = segue.destination as! ComposeTableViewController
       
   331             // destination.appConfig = config.appConfig
       
   332             //            if let draft = draftMessageToCompose {
       
   333             //                draft.imapFlags?.seen = true
       
   334             //
       
   335             //                destination.originalMessage = draft
       
   336             //                destination.composeMode = .draft
       
   337             //            }
       
   338             break
       
   339         case .segueReplyAll:
   324         case .segueReplyAll:
   340             if let nav = segue.destination as? UINavigationController,
   325             if let nav = segue.destination as? UINavigationController,
   341                 let destination = nav.topViewController as? ComposeTableViewController,
   326                 let destination = nav.topViewController as? ComposeTableViewController,
   342                 let cell = sender as? EmailListViewCell,
   327                 let cell = sender as? EmailListViewCell,
   343                 let indexPath = self.tableView.indexPath(for: cell),
   328                 let indexPath = self.tableView.indexPath(for: cell),
   365                 destination.composeMode = .forward
   350                 destination.composeMode = .forward
   366                 destination.appConfig = config?.appConfig
   351                 destination.appConfig = config?.appConfig
   367                 destination.originalMessage = email
   352                 destination.originalMessage = email
   368             }
   353             }
   369             break
   354             break
   370         default: ()
   355         case .segueAddNewAccount, .segueEditAccounts, .segueCompose, .noSegue:
       
   356             break
   371         }
   357         }
   372     }
   358     }
   373 
   359 
   374     func didChangeInternal(messageFolder: MessageFolder) {
   360     func didChangeInternal(messageFolder: MessageFolder) {
   375         if let folder = config?.folder,
   361         if let folder = config?.folder,