pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
changeset 1675 21f792356f97
parent 1664 7fa84db06f26
child 1678 8eb2c23637d6
     1.1 --- a/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Thu Feb 09 16:11:37 2017 +0100
     1.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Fri Feb 10 17:13:35 2017 +0100
     1.3 @@ -378,7 +378,12 @@
     1.4              if let msg = messageFolder as? Message {
     1.5                  if msg.isOriginal {
     1.6                      // new message has arrived
     1.7 -                    tableView.reloadData()
     1.8 +                    if let index = folder.indexOf(message: msg) {
     1.9 +                        let ip = IndexPath(row: index, section: 0)
    1.10 +                        tableView.insertRows(at: [ip], with: .automatic)
    1.11 +                    } else {
    1.12 +                        tableView.reloadData()
    1.13 +                    }
    1.14                  } else if msg.isGhost {
    1.15                      if let cell = cellsByMessageID.object(forKey: msg.uuid as NSString) {
    1.16                          if let ip = cell.indexPath {
    1.17 @@ -409,7 +414,7 @@
    1.18                  Log.info(component: #function, content: "flag changes?")
    1.19              }
    1.20          }
    1.21 -        GCD.onMain {
    1.22 +        GCD.onMainWait {
    1.23              self.didChangeInternal(messageFolder: messageFolder)
    1.24          }
    1.25      }