pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
changeset 2240 cc38768aa006
parent 2191 a01eb69e9664
child 2248 75013a586bfd
equal deleted inserted replaced
2239:80548b827d32 2240:cc38768aa006
    78 
    78 
    79     func initialConfig() {
    79     func initialConfig() {
    80         guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else {
    80         guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else {
    81             return
    81             return
    82         }
    82         }
    83         if Account.all().isEmpty {
       
    84             performSegue(withIdentifier:.segueAddNewAccount, sender: self)
       
    85         }
       
    86         if config == nil {
    83         if config == nil {
    87             config = EmailListConfig(appConfig: appDelegate.appConfig,
    84             config = EmailListConfig(appConfig: appDelegate.appConfig,
    88                                      folder: Folder.unifiedInbox())
    85                                      folder: Folder.unifiedInbox())
       
    86         }
       
    87         if Account.all().isEmpty {
       
    88             performSegue(withIdentifier:.segueAddNewAccount, sender: self)
    89         }
    89         }
    90         self.title = config?.folder?.realName
    90         self.title = config?.folder?.realName
    91     }
    91     }
    92 
    92 
    93     func addSearchBar() {
    93     func addSearchBar() {
   390                 destiny.filterDelegate = self
   390                 destiny.filterDelegate = self
   391                 destiny.inFolder = false
   391                 destiny.inFolder = false
   392                 destiny.filterEnabled = self.config?.folder?.filter as! Filter?
   392                 destiny.filterEnabled = self.config?.folder?.filter as! Filter?
   393             }
   393             }
   394             break
   394             break
   395         case .segueAddNewAccount, .segueEditAccounts, .segueCompose, .noSegue:
   395         case .segueAddNewAccount:
       
   396             if let navVC = segue.destination as? UINavigationController,
       
   397                 let vc = navVC.topViewController as? LoginTableViewController {
       
   398                 vc.appConfig = config?.appConfig
       
   399             }
       
   400         case .segueEditAccounts, .segueCompose, .noSegue:
   396             break
   401             break
   397         }
   402         }
   398 
   403 
   399     }
   404     }
   400 
   405