pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
branchIOS-700-sluggish-ui
changeset 3226 9295883a4519
parent 3224 44f27d1daf68
child 3266 72d4c077ec46
equal deleted inserted replaced
3225:52581ff6d29b 3226:9295883a4519
    85     private func setup() {
    85     private func setup() {
    86         if let vm = model {
    86         if let vm = model {
    87             // We came back from e.g EmailView ...
    87             // We came back from e.g EmailView ...
    88             updateFilterText()
    88             updateFilterText()
    89             // ... so we want to update "seen" status
    89             // ... so we want to update "seen" status
    90             DispatchQueue.main.async {
    90             vm.reloadData()
    91                 vm.reloadData()
    91         }
    92             }
    92         else if folderToShow == nil {
    93         }
       
    94 
       
    95         if folderToShow == nil {
       
    96             // We have not been created to show a specific folder, thus we show unified inbox
    93             // We have not been created to show a specific folder, thus we show unified inbox
    97             folderToShow = UnifiedInbox()
    94             folderToShow = UnifiedInbox()
    98             resetModel()
    95             resetModel()
    99         } else if model == nil {
    96         }
       
    97         else if model == nil {
   100             // We still got no model, because:
    98             // We still got no model, because:
   101             // - We are not coming back from a pushed view (for instance ComposeEmailView)
    99             // - We are not coming back from a pushed view (for instance ComposeEmailView)
   102             // - We are not a UnifiedInbox
   100             // - We are not a UnifiedInbox
   103             // So we have been created to show a specific folder, show it.
   101             // So we have been created to show a specific folder. Show it!
   104             resetModel()
   102             resetModel()
   105         }
   103         }
   106         
   104         
   107         if noAccountsExist() {
   105         if noAccountsExist() {
   108             performSegue(withIdentifier:.segueAddNewAccount, sender: self)
   106             performSegue(withIdentifier:.segueAddNewAccount, sender: self)