pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
changeset 3521 2628538df4d5
parent 3514 9a4b16d7434d
child 3522 9326deae631d
     1.1 --- a/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Mon Dec 04 17:14:26 2017 +0100
     1.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Mon Dec 04 17:39:36 2017 +0100
     1.3 @@ -153,6 +153,14 @@
     1.4              Log.shared.errorAndCrash(component: #function, errorString: "We should have a row here")
     1.5              return
     1.6          }
     1.7 +        guard let folder = folderToShow else {
     1.8 +            Log.shared.errorAndCrash(component: #function, errorString: "No folder")
     1.9 +            return
    1.10 +        }
    1.11 +        if folder.folderType == .drafts {
    1.12 +            // Mails in drafts folder can only be opened in compose mode, which is shown modally.
    1.13 +            cell.accessoryDisclosureIndicator.isHidden = true
    1.14 +        }
    1.15          cell.senderLabel.text = row.from
    1.16          cell.subjectLabel.text = row.subject
    1.17          cell.summaryLabel.text = row.bodyPeek
    1.18 @@ -162,7 +170,7 @@
    1.19          cell.dateLabel.text = row.dateText
    1.20          // Set image from cache if any
    1.21          cell.setContactImage(image: row.senderContactImage)
    1.22 -        
    1.23 +
    1.24          let op = BlockOperation() { [weak self] in
    1.25              MessageModel.performAndWait {
    1.26                  // ... and expensive computations in background