merges default IOS-663
authorbuff <andreas@pep-project.org>
Wed, 16 May 2018 15:06:03 +0200
branchIOS-663
changeset 4708ebe8da58422d
parent 4707 c02fdcbd4f05
parent 4703 6da942c9bdcd
child 4709 1d607e5898c4
merges default
Design/UI/pEpForIOS-Message-Unknown-Threading.png
Design/UI/pForIOS-iPhoneXHomeScreen-QuickAction-Widget.png
     1.1 Binary file Design/UI/pEpForIOS-HomeScreen.png has changed
     2.1 Binary file Design/UI/pEpForIOS-Mailboxes.png has changed
     3.1 Binary file Design/UI/pEpForIOS-Message-Unknown-Threading.png has changed
     4.1 Binary file Design/UI/pEpForIOS-iPad-Inbox-vertical.png has changed
     5.1 Binary file Design/UI/pEpForIOS-iPad-Mailboxes-Threading-vertical.png has changed
     6.1 Binary file Design/UI/pEpForIOS-iPhoneX-Compose.png has changed
     7.1 Binary file Design/UI/pEpForIOS-iPhoneX-Inbox-Search.png has changed
     8.1 Binary file Design/UI/pEpForIOS-iPhoneX-Message-expanded.png has changed
     9.1 Binary file Design/UI/pEpForIOS-iPhoneX-Message.png has changed
    10.1 Binary file Design/UI/pForIOS-iPhoneX-HomeScreen-QuickAction-Widget.png has changed
    11.1 Binary file Design/UI/pForIOS-iPhoneXHomeScreen-QuickAction-Widget.png has changed
    12.1 --- a/pEpForiOS/UI/EmailDisplayList/EmailListViewController.swift	Wed May 16 15:04:27 2018 +0200
    12.2 +++ b/pEpForiOS/UI/EmailDisplayList/EmailListViewController.swift	Wed May 16 15:06:03 2018 +0200
    12.3 @@ -361,6 +361,10 @@
    12.4      
    12.5      // MARK: - SwipeTableViewCellDelegate
    12.6  
    12.7 +    fileprivate func folderIsDraft(_ parentFolder: Folder) -> Bool {
    12.8 +        return parentFolder.folderType != .drafts
    12.9 +    }
   12.10 +
   12.11      func tableView(_ tableView: UITableView,
   12.12                     editActionsForRowAt
   12.13          indexPath: IndexPath,
   12.14 @@ -396,15 +400,18 @@
   12.15          swipeActions.append(archiveAction)
   12.16  
   12.17          // Flag
   12.18 -        let flagAction = SwipeAction(style: .default, title: "Flag") { action, indexPath in
   12.19 -            self.flagAction(forCellAt: indexPath)
   12.20 +        if folderIsDraft(parentFolder) {
   12.21 +            // Do not add "Flag" action to drafted mails.
   12.22 +            let flagAction = SwipeAction(style: .default, title: "Flag") { action, indexPath in
   12.23 +                self.flagAction(forCellAt: indexPath)
   12.24 +            }
   12.25 +            flagAction.hidesWhenSelected = true
   12.26 +            configure(action: flagAction, with: .flag)
   12.27 +            swipeActions.append(flagAction)
   12.28          }
   12.29 -        flagAction.hidesWhenSelected = true
   12.30 -        configure(action: flagAction, with: .flag)
   12.31 -        swipeActions.append(flagAction)
   12.32  
   12.33          // More (reply++)
   12.34 -        if parentFolder.folderType != .drafts {
   12.35 +        if folderIsDraft(parentFolder) {
   12.36              // Do not add "more" actions (reply...) to drafted mails.
   12.37              let moreAction = SwipeAction(style: .default, title: "More") { action, indexPath in
   12.38                  self.moreAction(forCellAt: indexPath)