IOS-1495 rm dead and obsolete code IOS-1521+IOS-1495
authorbuff <andreas@pep-project.org>
Tue, 14 May 2019 19:25:54 +0200
branchIOS-1521+IOS-1495
changeset 86149332d31f8949
parent 8613 463170dfc0b8
child 8615 e23f4c0960c2
IOS-1495 rm dead and obsolete code
pEpForiOS.xcodeproj/project.pbxproj
pEpForiOS/UI/EmailDisplayList/MessageViewModel.swift
pEpForiOS/UI/MessageThreading/Message+MessageIdentitfying.swift
pEpForiOS/UI/MessageThreading/MessageIdentitfying.swift
     1.1 --- a/pEpForiOS.xcodeproj/project.pbxproj	Tue May 14 19:07:45 2019 +0200
     1.2 +++ b/pEpForiOS.xcodeproj/project.pbxproj	Tue May 14 19:25:54 2019 +0200
     1.3 @@ -239,8 +239,6 @@
     1.4  		43425EDD1FE3DF3B004A2728 /* OAuth2Provider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43425EDC1FE3DF3B004A2728 /* OAuth2Provider.swift */; };
     1.5  		43425EDF1FE3E052004A2728 /* OAuth2ProviderFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43425EDE1FE3E052004A2728 /* OAuth2ProviderFactory.swift */; };
     1.6  		4348EF151E27E37400F441A9 /* Unit 1 unittest.ios.1@peptest.ch (0x9CB8DBCC) pub.asc in Resources */ = {isa = PBXBuildFile; fileRef = 4348EF141E27E37400F441A9 /* Unit 1 unittest.ios.1@peptest.ch (0x9CB8DBCC) pub.asc */; };
     1.7 -		43497B38211C62DE00AC42B0 /* MessageIdentitfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43497B37211C62DE00AC42B0 /* MessageIdentitfying.swift */; };
     1.8 -		43497B3A211C63CA00AC42B0 /* Message+MessageIdentitfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43497B39211C63CA00AC42B0 /* Message+MessageIdentitfying.swift */; };
     1.9  		43498CDB200CF20F006DC947 /* LoginViewModelLoginErrorDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43498CDA200CF20F006DC947 /* LoginViewModelLoginErrorDelegate.swift */; };
    1.10  		43498CDD200D0790006DC947 /* LoginViewModelOAuth2ErrorDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43498CDC200D0790006DC947 /* LoginViewModelOAuth2ErrorDelegate.swift */; };
    1.11  		434AC3E320A450D800C11B7F /* UIAlertController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 434AC3E220A450D700C11B7F /* UIAlertController+Extension.swift */; };
    1.12 @@ -724,8 +722,6 @@
    1.13  		43425EDC1FE3DF3B004A2728 /* OAuth2Provider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2Provider.swift; sourceTree = "<group>"; };
    1.14  		43425EDE1FE3E052004A2728 /* OAuth2ProviderFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth2ProviderFactory.swift; sourceTree = "<group>"; };
    1.15  		4348EF141E27E37400F441A9 /* Unit 1 unittest.ios.1@peptest.ch (0x9CB8DBCC) pub.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Unit 1 unittest.ios.1@peptest.ch (0x9CB8DBCC) pub.asc"; sourceTree = "<group>"; };
    1.16 -		43497B37211C62DE00AC42B0 /* MessageIdentitfying.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageIdentitfying.swift; sourceTree = "<group>"; };
    1.17 -		43497B39211C63CA00AC42B0 /* Message+MessageIdentitfying.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Message+MessageIdentitfying.swift"; sourceTree = "<group>"; };
    1.18  		43498CDA200CF20F006DC947 /* LoginViewModelLoginErrorDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewModelLoginErrorDelegate.swift; sourceTree = "<group>"; };
    1.19  		43498CDC200D0790006DC947 /* LoginViewModelOAuth2ErrorDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewModelOAuth2ErrorDelegate.swift; sourceTree = "<group>"; };
    1.20  		434AC3E220A450D700C11B7F /* UIAlertController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIAlertController+Extension.swift"; sourceTree = "<group>"; };
    1.21 @@ -2077,7 +2073,6 @@
    1.22  				B706C0EF1EA8C378006B2F6C /* StoryboardFiles */,
    1.23  				432E80FA2191AF5100359879 /* Fonts */,
    1.24  				43AA82511E9B925000ABD5A8 /* Util */,
    1.25 -				43F8D80020C537640038ABD5 /* MessageThreading */,
    1.26  				003C0FAA20B57C2E0093A987 /* SplitView */,
    1.27  				15BA537A20A1F5CA0090F126 /* MoveToFolder */,
    1.28  				15265942216230B0006A78DF /* Compose */,
    1.29 @@ -2117,15 +2112,6 @@
    1.30  			path = ImapSetup;
    1.31  			sourceTree = "<group>";
    1.32  		};
    1.33 -		43F8D80020C537640038ABD5 /* MessageThreading */ = {
    1.34 -			isa = PBXGroup;
    1.35 -			children = (
    1.36 -				43497B37211C62DE00AC42B0 /* MessageIdentitfying.swift */,
    1.37 -				43497B39211C63CA00AC42B0 /* Message+MessageIdentitfying.swift */,
    1.38 -			);
    1.39 -			path = MessageThreading;
    1.40 -			sourceTree = "<group>";
    1.41 -		};
    1.42  		49174CAD21EE408F006DBD63 /* PDF Security Tests */ = {
    1.43  			isa = PBXGroup;
    1.44  			children = (
    1.45 @@ -2895,7 +2881,6 @@
    1.46  				152A39E421905C3E00D9F8E4 /* NSAttributedString+RecipientTextUtils.swift in Sources */,
    1.47  				00EB89AD20E3D3C200CDFA0D /* ThreadedEmailViewModel+MoveToFolderDelegate.swift in Sources */,
    1.48  				155050F21FE95D8A009CEAD2 /* UserNotificationTool+pEp.swift in Sources */,
    1.49 -				43497B3A211C63CA00AC42B0 /* Message+MessageIdentitfying.swift in Sources */,
    1.50  				15874BC72127493E00A3A4A6 /* SettingDefaultAccountTableViewController.swift in Sources */,
    1.51  				4388A0E22008F813008CB98D /* (null) in Sources */,
    1.52  				152A39D021905C3E00D9F8E4 /* AttachmentCell.swift in Sources */,
    1.53 @@ -2969,7 +2954,6 @@
    1.54  				49C34AF620E4F649009D11CC /* CellDetailTransition.swift in Sources */,
    1.55  				492EF92A20C18C6C004EAE14 /* DisplayedMessage.swift in Sources */,
    1.56  				49228A5520D4035100A51E9D /* DetailCellSegue.swift in Sources */,
    1.57 -				43497B38211C62DE00AC42B0 /* MessageIdentitfying.swift in Sources */,
    1.58  				00FD0CE82102014C00BA0C56 /* PrimarySplitViewcontroller+ScreenComposerProtocol.swift in Sources */,
    1.59  				152A39E821905C3E00D9F8E4 /* RecipientCellViewModel.swift in Sources */,
    1.60  				152A39CE21905C3E00D9F8E4 /* ComposeHelpers.swift in Sources */,
     2.1 --- a/pEpForiOS/UI/EmailDisplayList/MessageViewModel.swift	Tue May 14 19:07:45 2019 +0200
     2.2 +++ b/pEpForiOS/UI/EmailDisplayList/MessageViewModel.swift	Tue May 14 19:25:54 2019 +0200
     2.3 @@ -40,7 +40,6 @@
     2.4              return getBodyMessage()
     2.5      }
     2.6      var displayedUsername: String
     2.7 -    var internalMessageCount: Int? = nil
     2.8      var internalBoddyPeek: String? = nil
     2.9      private var bodyPeek: String? {
    2.10          didSet {
    2.11 @@ -56,12 +55,7 @@
    2.12          }
    2.13      }
    2.14  
    2.15 -    //Only to use internally, external use should call public message()
    2.16 -    private var internalMessage: Message
    2.17 -
    2.18      required init(with message: Message, queue: OperationQueue) {
    2.19 -        internalMessage = message
    2.20 -
    2.21          self.queue = queue
    2.22  
    2.23          uid = message.uid
    2.24 @@ -85,7 +79,7 @@
    2.25          setBodyPeek(for: message)
    2.26      }
    2.27  
    2.28 -    static private func getDisplayedUsername(for message: Message)-> String{
    2.29 +    static private func getDisplayedUsername(for message: Message) -> String {
    2.30          if (message.parent.folderType == .sent
    2.31              || message.parent.folderType == .drafts){
    2.32              var identities: [String] = []
    2.33 @@ -138,6 +132,7 @@
    2.34  
    2.35      // Message threading is not supported. Let's keep it for now. It might be helpful for
    2.36      // reimplementing.
    2.37 +//    var internalMessageCount: Int? = nil
    2.38  //    func messageCount(completion: @escaping (Int)->()) {
    2.39  //        if let messageCount = internalMessageCount {
    2.40  //            completion(messageCount)
    2.41 @@ -301,7 +296,7 @@
    2.42      }
    2.43  
    2.44      public var debugDescription: String {
    2.45 -        return "<MessageViewModel |\(messageIdentifier)| |\(internalMessage.longMessage?.prefix(3) ?? "nil")|>"
    2.46 +        return "<MessageViewModel |\(uuid)| |\(longMessageFormatted?.prefix(3) ?? "nil")|>"
    2.47      }
    2.48  }
    2.49  
    2.50 @@ -319,12 +314,6 @@
    2.51      }
    2.52  }
    2.53  
    2.54 -extension MessageViewModel: MessageIdentitfying {
    2.55 -    var messageIdentifier: MessageID {
    2.56 -        return uuid
    2.57 -    }
    2.58 -}
    2.59 -
    2.60  // MARK: Operations
    2.61  
    2.62  extension MessageViewModel {
     3.1 --- a/pEpForiOS/UI/MessageThreading/Message+MessageIdentitfying.swift	Tue May 14 19:07:45 2019 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,17 +0,0 @@
     3.4 -//
     3.5 -//  Message+MessageIdentitfying.swift
     3.6 -//  pEp
     3.7 -//
     3.8 -//  Created by Dirk Zimmermann on 09.08.18.
     3.9 -//  Copyright © 2018 p≡p Security S.A. All rights reserved.
    3.10 -//
    3.11 -
    3.12 -import Foundation
    3.13 -
    3.14 -import MessageModel
    3.15 -
    3.16 -extension Message: MessageIdentitfying {
    3.17 -    public var messageIdentifier: MessageID {
    3.18 -        return messageID
    3.19 -    }
    3.20 -}
     4.1 --- a/pEpForiOS/UI/MessageThreading/MessageIdentitfying.swift	Tue May 14 19:07:45 2019 +0200
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,18 +0,0 @@
     4.4 -//
     4.5 -//  MessageIdentitfying.swift
     4.6 -//  pEp
     4.7 -//
     4.8 -//  Created by Dirk Zimmermann on 09.08.18.
     4.9 -//  Copyright © 2018 p≡p Security S.A. All rights reserved.
    4.10 -//
    4.11 -
    4.12 -import Foundation
    4.13 -
    4.14 -import MessageModel
    4.15 -
    4.16 -/**
    4.17 - Something that has a message-id.
    4.18 - */
    4.19 -public protocol MessageIdentitfying {
    4.20 -    var messageIdentifier: MessageID { get }
    4.21 -}