IOS-1224 fixes: deleted flag change ignored by UI
authorbuff <andreas@pep-project.org>
Wed, 01 Aug 2018 19:59:27 +0200
changeset 56655911fc5985ad
parent 5664 0d4f8fba5414
child 5666 a32e25ec501d
IOS-1224 fixes: deleted flag change ignored by UI
pEpForiOS/Models/CdMessage+Pantomime.swift
pEpForiOS/UI/EmailDisplayList/EmailListViewModel+MessageFolderDelegate.swift
     1.1 --- a/pEpForiOS/Models/CdMessage+Pantomime.swift	Wed Aug 01 17:56:52 2018 +0200
     1.2 +++ b/pEpForiOS/Models/CdMessage+Pantomime.swift	Wed Aug 01 19:59:27 2018 +0200
     1.3 @@ -471,6 +471,12 @@
     1.4          if !flags.deleted {
     1.5              MessageModelConfig.messageFolderDelegate?.didUpdate(messageFolder: msg)
     1.6          }
     1.7 +            // IOS-1224: cuurrent solution. Awaiting answer on #dev.
     1.8 +            // For me /Delete flag modified is also a message update.
     1.9 +            // The current UI implementation has another opinion though.
    1.10 +        else {
    1.11 +            MessageModelConfig.messageFolderDelegate?.didDelete(messageFolder: msg)
    1.12 +        }
    1.13      }
    1.14  
    1.15      /**
     2.1 --- a/pEpForiOS/UI/EmailDisplayList/EmailListViewModel+MessageFolderDelegate.swift	Wed Aug 01 17:56:52 2018 +0200
     2.2 +++ b/pEpForiOS/UI/EmailDisplayList/EmailListViewModel+MessageFolderDelegate.swift	Wed Aug 01 19:59:27 2018 +0200
     2.3 @@ -192,7 +192,7 @@
     2.4          }
     2.5  
     2.6          let previewMessage = PreviewMessage(withMessage: message)
     2.7 -        if !previewMessage.flagsDiffer(previewMessage: existingMessage) {
     2.8 +        if !previewMessage.flagsDiffer(previewMessage: existingMessage) { //IOS-1224: handle: message is flagged deleted
     2.9              // The only message properties displayed in this view that might be updated
    2.10              // are flagged and seen.
    2.11              // We got called even the flaggs did not change. Ignore.