IOS-827 stops showing accessory disclosure indicator in draft folder
authorbuff <andreas@pep-project.org>
Mon, 04 Dec 2017 17:39:36 +0100
changeset 35212628538df4d5
parent 3520 029110350584
child 3522 9326deae631d
IOS-827 stops showing accessory disclosure indicator in draft folder
pEpForiOS/Base.lproj/Main.storyboard
pEpForiOS/UI/EmailDisplay/EmailListViewCell.swift
pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
     1.1 --- a/pEpForiOS/Base.lproj/Main.storyboard	Mon Dec 04 17:14:26 2017 +0100
     1.2 +++ b/pEpForiOS/Base.lproj/Main.storyboard	Mon Dec 04 17:39:36 2017 +0100
     1.3 @@ -116,6 +116,7 @@
     1.4                                      </constraints>
     1.5                                  </tableViewCellContentView>
     1.6                                  <connections>
     1.7 +                                    <outlet property="accessoryDisclosureIndicator" destination="MDV-jl-oqJ" id="qFC-0O-RXG"/>
     1.8                                      <outlet property="attachmentIcon" destination="3BC-6k-zL0" id="ZMO-5d-OGj"/>
     1.9                                      <outlet property="contactImageView" destination="YqR-ga-Tf9" id="E2c-EP-D1U"/>
    1.10                                      <outlet property="dateLabel" destination="Wkg-wf-Dbd" id="TSP-tH-GR2"/>
     2.1 --- a/pEpForiOS/UI/EmailDisplay/EmailListViewCell.swift	Mon Dec 04 17:14:26 2017 +0100
     2.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailListViewCell.swift	Mon Dec 04 17:39:36 2017 +0100
     2.3 @@ -29,6 +29,7 @@
     2.4      @IBOutlet weak var attachmentIcon: UIImageView!
     2.5      @IBOutlet weak var contactImageView: UIImageView!
     2.6  
     2.7 +    @IBOutlet weak var accessoryDisclosureIndicator: UIImageView!
     2.8      var isFlagged:Bool = false {
     2.9          didSet {
    2.10              if isFlagged {
     3.1 --- a/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Mon Dec 04 17:14:26 2017 +0100
     3.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Mon Dec 04 17:39:36 2017 +0100
     3.3 @@ -153,6 +153,14 @@
     3.4              Log.shared.errorAndCrash(component: #function, errorString: "We should have a row here")
     3.5              return
     3.6          }
     3.7 +        guard let folder = folderToShow else {
     3.8 +            Log.shared.errorAndCrash(component: #function, errorString: "No folder")
     3.9 +            return
    3.10 +        }
    3.11 +        if folder.folderType == .drafts {
    3.12 +            // Mails in drafts folder can only be opened in compose mode, which is shown modally.
    3.13 +            cell.accessoryDisclosureIndicator.isHidden = true
    3.14 +        }
    3.15          cell.senderLabel.text = row.from
    3.16          cell.subjectLabel.text = row.subject
    3.17          cell.summaryLabel.text = row.bodyPeek
    3.18 @@ -162,7 +170,7 @@
    3.19          cell.dateLabel.text = row.dateText
    3.20          // Set image from cache if any
    3.21          cell.setContactImage(image: row.senderContactImage)
    3.22 -        
    3.23 +
    3.24          let op = BlockOperation() { [weak self] in
    3.25              MessageModel.performAndWait {
    3.26                  // ... and expensive computations in background