IOS-1480 Avoid names like MessageModel. exp_IOS-1480
authorDirk Zimmermann <dz@pep.security>
Fri, 08 Mar 2019 09:27:22 +0100
branchexp_IOS-1480
changeset 7914f3cdfb75ad41
parent 7913 588742431db3
child 7915 1da1d78a3c11
IOS-1480 Avoid names like MessageModel.
pEpForiOS/AppDelegate.swift
pEpForiOS/Network/ConnectInfo/EmailConnectInfo+Extension.swift
pEpForiOS/UI/EmailDisplayList/EmailListViewModel+EmailDisplayDelegate.swift
pEpForiOS/UI/EmailDisplayList/EmailListViewModel.swift
pEpForiOS/UI/EmailDisplayList/MessageViewModel.swift
pEpForiOS/UI/Folder/ViewModel/FolderViewModel.swift
pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift
pEpForiOS/UI/ManualLogin/SMTPSetup/SMTPSettingsTableViewController.swift
pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift
pEpForiOS/UI/Thread/ViewModel/ThreadedEmailViewModel.swift
     1.1 --- a/pEpForiOS/AppDelegate.swift	Fri Mar 08 09:27:22 2019 +0100
     1.2 +++ b/pEpForiOS/AppDelegate.swift	Fri Mar 08 09:27:22 2019 +0100
     1.3 @@ -228,7 +228,7 @@
     1.4              // The calls are nested to avoid simultaniously showing permissions alert for notifications
     1.5              // and contact access.
     1.6              DispatchQueue.global(qos: .userInitiated).async {
     1.7 -                MessageModel.perform {
     1.8 +                MessageModelUtil.perform {
     1.9                      AddressBook.checkAndTransfer()
    1.10                  }
    1.11              }
    1.12 @@ -283,7 +283,7 @@
    1.13  
    1.14      func applicationWillEnterForeground(_ application: UIApplication) {
    1.15          DispatchQueue.global(qos: .userInitiated).async {
    1.16 -            MessageModel.perform {
    1.17 +            MessageModelUtil.perform {
    1.18                  AddressBook.checkAndTransfer()
    1.19              }
    1.20          }
     2.1 --- a/pEpForiOS/Network/ConnectInfo/EmailConnectInfo+Extension.swift	Fri Mar 08 09:27:22 2019 +0100
     2.2 +++ b/pEpForiOS/Network/ConnectInfo/EmailConnectInfo+Extension.swift	Fri Mar 08 09:27:22 2019 +0100
     2.3 @@ -16,7 +16,7 @@
     2.4      func folderBy(name: String) throws -> Folder? {
     2.5          var cdResult: CdFolder?
     2.6          var error: Error?
     2.7 -        MessageModel.performAndWait { [weak self] in
     2.8 +        MessageModelUtil.performAndWait { [weak self] in
     2.9              guard let me = self else {
    2.10                  Logger.frontendLogger.lostMySelf()
    2.11                  return
     3.1 --- a/pEpForiOS/UI/EmailDisplayList/EmailListViewModel+EmailDisplayDelegate.swift	Fri Mar 08 09:27:22 2019 +0100
     3.2 +++ b/pEpForiOS/UI/EmailDisplayList/EmailListViewModel+EmailDisplayDelegate.swift	Fri Mar 08 09:27:22 2019 +0100
     3.3 @@ -21,7 +21,7 @@
     3.4  
     3.5      func emailDisplayDidDelete(message: Message) {
     3.6  
     3.7 -        MessageModel.performAndWait { [weak self] in
     3.8 +        MessageModelUtil.performAndWait { [weak self] in
     3.9              guard let me = self else {
    3.10                  Logger.frontendLogger.lostMySelf()
    3.11                  return
     4.1 --- a/pEpForiOS/UI/EmailDisplayList/EmailListViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
     4.2 +++ b/pEpForiOS/UI/EmailDisplayList/EmailListViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
     4.3 @@ -357,7 +357,7 @@
     4.4      }
     4.5  
     4.6      internal func requestEmailViewIfNeeded(for message:Message) {
     4.7 -        MessageModel.performAndWait {
     4.8 +        MessageModelUtil.performAndWait {
     4.9              DispatchQueue.main.async {
    4.10                  self.screenComposer?.emailListViewModel(self, requestsShowEmailViewFor: message)
    4.11              }
     5.1 --- a/pEpForiOS/UI/EmailDisplayList/MessageViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
     5.2 +++ b/pEpForiOS/UI/EmailDisplayList/MessageViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
     5.3 @@ -328,7 +328,7 @@
     5.4              guard let me = self else {
     5.5                  return
     5.6              }
     5.7 -            MessageModel.performAndWait {
     5.8 +            MessageModelUtil.performAndWait {
     5.9                  guard
    5.10                      let operation = operation,
    5.11                      !operation.isCancelled else {
    5.12 @@ -354,7 +354,7 @@
    5.13                  !operation.isCancelled else {
    5.14                      return
    5.15              }
    5.16 -            MessageModel.performAndWait {
    5.17 +            MessageModelUtil.performAndWait {
    5.18                  guard !operation.isCancelled else {
    5.19                      return
    5.20                  }
    5.21 @@ -379,7 +379,7 @@
    5.22              guard let me = self else {
    5.23                  return
    5.24              }
    5.25 -            MessageModel.performAndWait {
    5.26 +            MessageModelUtil.performAndWait {
    5.27                  guard
    5.28                      let operation = operation,
    5.29                      !operation.isCancelled,
    5.30 @@ -401,7 +401,7 @@
    5.31              guard let me = self else {
    5.32                  return
    5.33              }
    5.34 -            MessageModel.performAndWait {
    5.35 +            MessageModelUtil.performAndWait {
    5.36                  guard
    5.37                      let operation = operation,
    5.38                      !operation.isCancelled else {
     6.1 --- a/pEpForiOS/UI/Folder/ViewModel/FolderViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
     6.2 +++ b/pEpForiOS/UI/Folder/ViewModel/FolderViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
     6.3 @@ -61,7 +61,7 @@
     6.4      
     6.5      func refreshFolderList() {
     6.6          DispatchQueue.global(qos: .userInitiated).async {
     6.7 -            MessageModel.perform {
     6.8 +            MessageModelUtil.perform {
     6.9                  self.folderSyncService.requestFolders(inAccounts: Account.all())
    6.10              }
    6.11          }
     7.1 --- a/pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
     7.2 +++ b/pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
     7.3 @@ -196,7 +196,7 @@
     7.4                    result: AccountVerificationResult) {
     7.5          if result == .ok {
     7.6              //remove obsolete code on EmailListViewController
     7.7 -            MessageModel.performAndWait {
     7.8 +            MessageModelUtil.performAndWait {
     7.9                  account.save()
    7.10              }
    7.11              mySelfer?.startMySelf()
     8.1 --- a/pEpForiOS/UI/ManualLogin/SMTPSetup/SMTPSettingsTableViewController.swift	Fri Mar 08 09:27:22 2019 +0100
     8.2 +++ b/pEpForiOS/UI/ManualLogin/SMTPSetup/SMTPSettingsTableViewController.swift	Fri Mar 08 09:27:22 2019 +0100
     8.3 @@ -159,7 +159,7 @@
     8.4      func verified(account: Account, service: AccountVerificationServiceProtocol,
     8.5                    result: AccountVerificationResult) {
     8.6          if result == .ok {
     8.7 -            MessageModel.performAndWait { [weak self] in
     8.8 +            MessageModelUtil.performAndWait { [weak self] in
     8.9                  guard let me = self else {
    8.10                      Logger.frontendLogger.lostMySelf()
    8.11                      return
     9.1 --- a/pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
     9.2 +++ b/pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
     9.3 @@ -191,7 +191,7 @@
     9.4                    service: AccountVerificationServiceProtocol,
     9.5                    result: AccountVerificationResult) {
     9.6          if result == .ok {
     9.7 -            MessageModel.performAndWait {
     9.8 +            MessageModelUtil.performAndWait {
     9.9                  account.save()
    9.10              }
    9.11          }
    10.1 --- a/pEpForiOS/UI/Thread/ViewModel/ThreadedEmailViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
    10.2 +++ b/pEpForiOS/UI/Thread/ViewModel/ThreadedEmailViewModel.swift	Fri Mar 08 09:27:22 2019 +0100
    10.3 @@ -198,7 +198,7 @@
    10.4          let currentSeen = message?.imapFlags?.seen ?? false
    10.5          if !currentSeen {
    10.6              message?.imapFlags?.seen = true
    10.7 -            MessageModel.performAndWait {
    10.8 +            MessageModelUtil.performAndWait {
    10.9                  message?.save()
   10.10              }
   10.11          }