IOS-490 viewed folders marked as "interesting"
authorDirk Zimmermann <dirk@pep-project.org>
Tue, 23 May 2017 11:32:32 +0200
changeset 2191a01eb69e9664
parent 2190 4fe9e5ba269d
child 2192 27bc2aecd298
IOS-490 viewed folders marked as "interesting"
pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
pEpForiOS/UI/Folder/ViewModel/FolderCellViewModel.swift
     1.1 --- a/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Mon May 22 18:39:45 2017 +0200
     1.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Tue May 23 11:32:32 2017 +0200
     1.3 @@ -62,6 +62,11 @@
     1.4          initialConfig()
     1.5          updateModel()
     1.6  
     1.7 +        // Mark this folder as having been looked at by the user
     1.8 +        if let fol = config?.folder {
     1.9 +            fol.updateLastLookAt()
    1.10 +        }
    1.11 +
    1.12          MessageModelConfig.messageFolderDelegate = self
    1.13      }
    1.14  
    1.15 @@ -79,7 +84,8 @@
    1.16              performSegue(withIdentifier:.segueAddNewAccount, sender: self)
    1.17          }
    1.18          if config == nil {
    1.19 -            config = EmailListConfig(appConfig: appDelegate.appConfig, folder: Folder.unifiedInbox())
    1.20 +            config = EmailListConfig(appConfig: appDelegate.appConfig,
    1.21 +                                     folder: Folder.unifiedInbox())
    1.22          }
    1.23          self.title = config?.folder?.realName
    1.24      }
     2.1 --- a/pEpForiOS/UI/Folder/ViewModel/FolderCellViewModel.swift	Mon May 22 18:39:45 2017 +0200
     2.2 +++ b/pEpForiOS/UI/Folder/ViewModel/FolderCellViewModel.swift	Tue May 23 11:32:32 2017 +0200
     2.3 @@ -10,16 +10,18 @@
     2.4  import MessageModel
     2.5  
     2.6  public class FolderCellViewModel {
     2.7 -
     2.8      public var icon: UIImage {
     2.9          return self.folder.folderType.getIconType()
    2.10      }
    2.11 +
    2.12      public var title : String {
    2.13          return self.name
    2.14      }
    2.15 +
    2.16      public var number: Int {
    2.17          return 0 //fake number
    2.18      }
    2.19 +
    2.20      public var arrow: UIImage {
    2.21          return UIImage(named: "arrow_down_icon")!
    2.22      }
    2.23 @@ -43,5 +45,4 @@
    2.24      var leftPadding: Int {
    2.25          return level
    2.26      }
    2.27 -    
    2.28  }