IOS-83 move trust handling to email view
authorDirk Zimmermann <dirk@pep-project.org>
Thu, 16 Feb 2017 19:30:32 +0100
changeset 17252ef8f9937e40
parent 1724 004282d9bf61
child 1726 04f45ddee25a
IOS-83 move trust handling to email view
pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
pEpForiOS/UI/EmailDisplay/EmailViewController.swift
     1.1 --- a/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Thu Feb 16 18:48:12 2017 +0100
     1.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Thu Feb 16 19:30:32 2017 +0100
     1.3 @@ -379,24 +379,6 @@
     1.4              }
     1.5          }
     1.6      }
     1.7 -
     1.8 -    /**
     1.9 -     For the unwind segue from the trustwords controller, when the user choses "trusted".
    1.10 -     */
    1.11 -    @IBAction func segueUnwindTrusted(segue: UIStoryboardSegue) {
    1.12 -        if let p = partnerIdentity {
    1.13 -            PEPUtil.trust(identity: p)
    1.14 -        }
    1.15 -    }
    1.16 -
    1.17 -    /**
    1.18 -     For the unwind segue from the trustwords controller, when the user choses "untrusted".
    1.19 -     */
    1.20 -    @IBAction func segueUnwindUnTrusted(segue: UIStoryboardSegue) {
    1.21 -        if let p = partnerIdentity {
    1.22 -            PEPUtil.mistrust(identity: p)
    1.23 -        }
    1.24 -    }
    1.25  }
    1.26  
    1.27  // MARK: - MessageFolderDelegate
     2.1 --- a/pEpForiOS/UI/EmailDisplay/EmailViewController.swift	Thu Feb 16 18:48:12 2017 +0100
     2.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailViewController.swift	Thu Feb 16 19:30:32 2017 +0100
     2.3 @@ -135,7 +135,8 @@
     2.4      
     2.5      @IBAction func showRatingPressed(_ sender: UIBarButtonItem) {
     2.6          let filtered = message.identitiesEligibleForHandshake(session: appConfig.session)
     2.7 -        
     2.8 +
     2.9 +        partnerIdentity = nil
    2.10          if filtered.count == 1 {
    2.11              partnerIdentity = filtered.first
    2.12              performSegue(withIdentifier: .segueTrustwords, sender: self)
    2.13 @@ -143,6 +144,24 @@
    2.14              performSegue(withIdentifier: .seguePrivacyStatus, sender: self)
    2.15          }
    2.16      }
    2.17 +
    2.18 +    /**
    2.19 +     For the unwind segue from the trustwords controller, when the user choses "trusted".
    2.20 +     */
    2.21 +    @IBAction func segueUnwindTrusted(segue: UIStoryboardSegue) {
    2.22 +        if let p = partnerIdentity {
    2.23 +            PEPUtil.trust(identity: p)
    2.24 +        }
    2.25 +    }
    2.26 +
    2.27 +    /**
    2.28 +     For the unwind segue from the trustwords controller, when the user choses "untrusted".
    2.29 +     */
    2.30 +    @IBAction func segueUnwindUnTrusted(segue: UIStoryboardSegue) {
    2.31 +        if let p = partnerIdentity {
    2.32 +            PEPUtil.mistrust(identity: p)
    2.33 +        }
    2.34 +    }
    2.35  }
    2.36  
    2.37  // MARK: TableView Delegate & Datasource