IOS-170 FilterView with diferents options
authorXavier Algarra <xavier@pep-project.org>
Mon, 13 Mar 2017 16:10:34 +0100
changeset 18328f9685564441
parent 1831 eeada9973971
child 1833 88f7ecbab0dd
IOS-170 FilterView with diferents options
pEpForiOS.xcodeproj/project.pbxproj
pEpForiOS/Base.lproj/Main.storyboard
pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
pEpForiOS/UI/EmailDisplay/FlagImages.swift
pEpForiOS/UI/Filter/FilterTableViewController.swift
pEpForiOS/UI/Filter/ViewModel/FilterCellViewModel.swift
pEpForiOS/UI/Filter/ViewModel/FilterViewModel.swift
     1.1 --- a/pEpForiOS.xcodeproj/project.pbxproj	Tue Mar 14 10:32:26 2017 +0100
     1.2 +++ b/pEpForiOS.xcodeproj/project.pbxproj	Mon Mar 13 16:10:34 2017 +0100
     1.3 @@ -194,6 +194,9 @@
     1.4  		B726CF781E5DB1F6005C19EF /* AccountSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = B726CF771E5DB1F6005C19EF /* AccountSection.swift */; };
     1.5  		B740B75D1E4B1C2D002585E1 /* jsonMimeType.txt in Resources */ = {isa = PBXBuildFile; fileRef = B740B75C1E4B1C2D002585E1 /* jsonMimeType.txt */; };
     1.6  		B740B75F1E4B1C46002585E1 /* MimeTypeUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = B740B75E1E4B1C46002585E1 /* MimeTypeUtil.swift */; };
     1.7 +		B78CF8251E76D706008C1739 /* FilterTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78CF8241E76D706008C1739 /* FilterTableViewController.swift */; };
     1.8 +		B78CF8291E76E0F1008C1739 /* FilterViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78CF8281E76E0F1008C1739 /* FilterViewModel.swift */; };
     1.9 +		B78CF82B1E76E146008C1739 /* FilterCellViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B78CF82A1E76E146008C1739 /* FilterCellViewModel.swift */; };
    1.10  		B7F19A001E5DE9FB0079A513 /* Folder+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7F199FF1E5DE9FB0079A513 /* Folder+Extensions.swift */; };
    1.11  /* End PBXBuildFile section */
    1.12  
    1.13 @@ -429,6 +432,9 @@
    1.14  		B726CF771E5DB1F6005C19EF /* AccountSection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AccountSection.swift; path = Folder/CellsAndSections/AccountSection.swift; sourceTree = "<group>"; };
    1.15  		B740B75C1E4B1C2D002585E1 /* jsonMimeType.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = jsonMimeType.txt; sourceTree = "<group>"; };
    1.16  		B740B75E1E4B1C46002585E1 /* MimeTypeUtil.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MimeTypeUtil.swift; sourceTree = "<group>"; };
    1.17 +		B78CF8241E76D706008C1739 /* FilterTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterTableViewController.swift; path = Filter/FilterTableViewController.swift; sourceTree = "<group>"; };
    1.18 +		B78CF8281E76E0F1008C1739 /* FilterViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterViewModel.swift; path = Filter/ViewModel/FilterViewModel.swift; sourceTree = "<group>"; };
    1.19 +		B78CF82A1E76E146008C1739 /* FilterCellViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FilterCellViewModel.swift; path = Filter/ViewModel/FilterCellViewModel.swift; sourceTree = "<group>"; };
    1.20  		B7F199FF1E5DE9FB0079A513 /* Folder+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Folder+Extensions.swift"; sourceTree = "<group>"; };
    1.21  /* End PBXFileReference section */
    1.22  
    1.23 @@ -849,6 +855,7 @@
    1.24  		43ED53611CC77F95006AB156 /* UI */ = {
    1.25  			isa = PBXGroup;
    1.26  			children = (
    1.27 +				B78CF8261E76D70D008C1739 /* Filter */,
    1.28  				43A6E0591E574A62005BEE69 /* UIViewController+Extension.swift */,
    1.29  				43A6E0491E5726C8005BEE69 /* Background */,
    1.30  				B71EBBB41E55E43100150177 /* Folder */,
    1.31 @@ -946,6 +953,24 @@
    1.32  			name = MimeTypes;
    1.33  			sourceTree = "<group>";
    1.34  		};
    1.35 +		B78CF8261E76D70D008C1739 /* Filter */ = {
    1.36 +			isa = PBXGroup;
    1.37 +			children = (
    1.38 +				B78CF8271E76E0DF008C1739 /* ViewModel */,
    1.39 +				B78CF8241E76D706008C1739 /* FilterTableViewController.swift */,
    1.40 +			);
    1.41 +			name = Filter;
    1.42 +			sourceTree = "<group>";
    1.43 +		};
    1.44 +		B78CF8271E76E0DF008C1739 /* ViewModel */ = {
    1.45 +			isa = PBXGroup;
    1.46 +			children = (
    1.47 +				B78CF8281E76E0F1008C1739 /* FilterViewModel.swift */,
    1.48 +				B78CF82A1E76E146008C1739 /* FilterCellViewModel.swift */,
    1.49 +			);
    1.50 +			name = ViewModel;
    1.51 +			sourceTree = "<group>";
    1.52 +		};
    1.53  /* End PBXGroup section */
    1.54  
    1.55  /* Begin PBXNativeTarget section */
    1.56 @@ -1168,6 +1193,7 @@
    1.57  				43C046BD1CF48D6300BD0D9D /* AddressBook.swift in Sources */,
    1.58  				431E8F7E1CFDCF3A00C33647 /* EmailViewController.swift in Sources */,
    1.59  				43E7B6751DE4A53A0017D707 /* CdIdentity+pEp.swift in Sources */,
    1.60 +				B78CF8251E76D706008C1739 /* FilterTableViewController.swift in Sources */,
    1.61  				222B35581DF96389007A1F82 /* Capability.swift in Sources */,
    1.62  				43CE63D11DE8866C00FAC505 /* Message+pEp.swift in Sources */,
    1.63  				43BB86941DB4E76D00980267 /* CdAccount+Extension.swift in Sources */,
    1.64 @@ -1206,6 +1232,7 @@
    1.65  				431144B71CC11D6A0007639D /* BaseOperation.swift in Sources */,
    1.66  				432198E81DF6B51B00318A74 /* LoginImapOperation.swift in Sources */,
    1.67  				43A0E73D1D16C99900159F41 /* NSArray+PureLayout.m in Sources */,
    1.68 +				B78CF82B1E76E146008C1739 /* FilterCellViewModel.swift in Sources */,
    1.69  				4333A2A51E5C9B6E0025D8A5 /* FixAttachmentsOperation.swift in Sources */,
    1.70  				4348EF0D1E27ABA100F441A9 /* LoginSmtpOperation.swift in Sources */,
    1.71  				49D521521E73E0690097987B /* Int16+ImapFlagBits.swift in Sources */,
    1.72 @@ -1239,6 +1266,7 @@
    1.73  				228038681DC9DE6D00F1CB45 /* TextfieldResponder.swift in Sources */,
    1.74  				433C51D31E66CCA900272E19 /* CreateSpecialFoldersOperation.swift in Sources */,
    1.75  				4318FF4A1D80551900B5BE18 /* MessageToAttachmentOperation.swift in Sources */,
    1.76 +				B78CF8291E76E0F1008C1739 /* FilterViewModel.swift in Sources */,
    1.77  				43980E271CBD0BC900A7FC3C /* AppDelegate.swift in Sources */,
    1.78  				8B77BD691E0C1D930060F11F /* AccountSettingsTableViewController.swift in Sources */,
    1.79  				433BCD951D5388C100DD98EF /* ReplyUtil.swift in Sources */,
     2.1 --- a/pEpForiOS/Base.lproj/Main.storyboard	Tue Mar 14 10:32:26 2017 +0100
     2.2 +++ b/pEpForiOS/Base.lproj/Main.storyboard	Mon Mar 13 16:10:34 2017 +0100
     2.3 @@ -22,7 +22,7 @@
     2.4                                  <rect key="frame" x="0.0" y="28" width="375" height="100"/>
     2.5                                  <autoresizingMask key="autoresizingMask"/>
     2.6                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uhL-VL-48i" id="jgQ-nZ-h1r">
     2.7 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
     2.8 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="99"/>
     2.9                                      <autoresizingMask key="autoresizingMask"/>
    2.10                                      <subviews>
    2.11                                          <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalCompressionResistancePriority="1000" text="Sender" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tWZ-jW-sUg">
    2.12 @@ -121,8 +121,18 @@
    2.13                          </connections>
    2.14                      </tableView>
    2.15                      <toolbarItems>
    2.16 -                        <barButtonItem image="unread-icon" id="VEt-1N-tdD"/>
    2.17 +                        <barButtonItem image="unread-icon" id="VEt-1N-tdD">
    2.18 +                            <connections>
    2.19 +                                <action selector="showUnreadButtonTapped:" destination="kcA-RK-9Xg" id="FX3-N7-2dC"/>
    2.20 +                            </connections>
    2.21 +                        </barButtonItem>
    2.22                          <barButtonItem style="plain" systemItem="flexibleSpace" id="e6L-xz-NU2"/>
    2.23 +                        <barButtonItem id="6Ua-EB-dEx">
    2.24 +                            <connections>
    2.25 +                                <segue destination="nc4-kR-K9D" kind="show" id="NeG-CV-nex"/>
    2.26 +                            </connections>
    2.27 +                        </barButtonItem>
    2.28 +                        <barButtonItem style="plain" systemItem="flexibleSpace" id="Ypz-yH-KbI"/>
    2.29                          <barButtonItem systemItem="compose" id="u8o-KA-6lO">
    2.30                              <connections>
    2.31                                  <segue destination="NY2-HI-4ou" kind="presentation" identifier="segueCompose" id="6vv-Jr-8Nm"/>
    2.32 @@ -142,7 +152,9 @@
    2.33                          </barButtonItem>
    2.34                      </navigationItem>
    2.35                      <connections>
    2.36 +                        <outlet property="enableFilterButton" destination="VEt-1N-tdD" id="0iq-eB-HNI"/>
    2.37                          <outlet property="searchDisplayController" destination="wi1-9j-AQt" id="5ik-CT-83m"/>
    2.38 +                        <outlet property="textFilterButton" destination="6Ua-EB-dEx" id="NqY-wd-9gI"/>
    2.39                          <segue destination="Efv-29-FEv" kind="presentation" identifier="segueAddNewAccount" id="Na7-CM-lbe"/>
    2.40                          <segue destination="NY2-HI-4ou" kind="presentation" identifier="segueReplyAll" id="xmi-xn-p8T"/>
    2.41                          <segue destination="NY2-HI-4ou" kind="presentation" identifier="segueForward" id="YH0-dx-pSs"/>
    2.42 @@ -173,7 +185,7 @@
    2.43                                  <rect key="frame" x="0.0" y="28" width="375" height="58"/>
    2.44                                  <autoresizingMask key="autoresizingMask"/>
    2.45                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Epo-ru-S9d" id="KqB-b6-IoI">
    2.46 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="58"/>
    2.47 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="57"/>
    2.48                                      <autoresizingMask key="autoresizingMask"/>
    2.49                                      <subviews>
    2.50                                          <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="To:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lwf-Sw-cKo">
    2.51 @@ -221,7 +233,7 @@
    2.52                                  <rect key="frame" x="0.0" y="86" width="375" height="58"/>
    2.53                                  <autoresizingMask key="autoresizingMask"/>
    2.54                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="BXJ-Ko-ZUm" id="Pc9-7u-OeC">
    2.55 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="58"/>
    2.56 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="57"/>
    2.57                                      <autoresizingMask key="autoresizingMask"/>
    2.58                                      <subviews>
    2.59                                          <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Subject:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DWr-lq-DOL">
    2.60 @@ -258,7 +270,7 @@
    2.61                                  <rect key="frame" x="0.0" y="144" width="375" height="260"/>
    2.62                                  <autoresizingMask key="autoresizingMask"/>
    2.63                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="xhW-oS-ri3" id="doY-9c-uKA">
    2.64 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="260"/>
    2.65 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="259"/>
    2.66                                      <autoresizingMask key="autoresizingMask"/>
    2.67                                      <subviews>
    2.68                                          <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="bVM-o9-45O" customClass="ComposeTextView" customModule="pEpForiOS" customModuleProvider="target">
    2.69 @@ -286,7 +298,7 @@
    2.70                                  <rect key="frame" x="0.0" y="404" width="375" height="190"/>
    2.71                                  <autoresizingMask key="autoresizingMask"/>
    2.72                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="prY-xp-1rI" id="FU0-SW-FOj">
    2.73 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="190"/>
    2.74 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="189"/>
    2.75                                      <autoresizingMask key="autoresizingMask"/>
    2.76                                      <subviews>
    2.77                                          <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="From:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U2j-jK-hcO">
    2.78 @@ -309,7 +321,7 @@
    2.79                                              </connections>
    2.80                                          </textView>
    2.81                                          <pickerView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="u8S-M4-JdW">
    2.82 -                                            <rect key="frame" x="-6" y="40" width="377" height="140"/>
    2.83 +                                            <rect key="frame" x="-7" y="40" width="377" height="140"/>
    2.84                                              <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
    2.85                                              <connections>
    2.86                                                  <outlet property="dataSource" destination="prY-xp-1rI" id="VoP-0P-HiT"/>
    2.87 @@ -375,7 +387,7 @@
    2.88                                          <rect key="frame" x="0.0" y="35" width="375" height="49"/>
    2.89                                          <autoresizingMask key="autoresizingMask"/>
    2.90                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ixi-Mt-3kg" id="wqB-dm-pDx">
    2.91 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
    2.92 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
    2.93                                              <autoresizingMask key="autoresizingMask"/>
    2.94                                              <subviews>
    2.95                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hUQ-RI-kfE">
    2.96 @@ -411,7 +423,7 @@
    2.97                                          <rect key="frame" x="0.0" y="84" width="375" height="49"/>
    2.98                                          <autoresizingMask key="autoresizingMask"/>
    2.99                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Muc-p7-eLR" id="ALh-ce-psL">
   2.100 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.101 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
   2.102                                              <autoresizingMask key="autoresizingMask"/>
   2.103                                              <subviews>
   2.104                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Email" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SCr-eb-mdn">
   2.105 @@ -447,7 +459,7 @@
   2.106                                          <rect key="frame" x="0.0" y="133" width="375" height="49"/>
   2.107                                          <autoresizingMask key="autoresizingMask"/>
   2.108                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wzw-Ix-clS" id="iw0-fF-fSh">
   2.109 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.110 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
   2.111                                              <autoresizingMask key="autoresizingMask"/>
   2.112                                              <subviews>
   2.113                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Username" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3ti-b6-5l8">
   2.114 @@ -486,7 +498,7 @@
   2.115                                          <rect key="frame" x="0.0" y="182" width="375" height="49"/>
   2.116                                          <autoresizingMask key="autoresizingMask"/>
   2.117                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="x9C-Hc-Hvk" id="Tc7-0e-d7T">
   2.118 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.119 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
   2.120                                              <autoresizingMask key="autoresizingMask"/>
   2.121                                              <subviews>
   2.122                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Password" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xbE-mW-hjW">
   2.123 @@ -580,7 +592,7 @@
   2.124                                          <rect key="frame" x="0.0" y="35" width="375" height="49"/>
   2.125                                          <autoresizingMask key="autoresizingMask"/>
   2.126                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yEs-RC-FK5" id="Kbm-32-bnt">
   2.127 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.128 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
   2.129                                              <autoresizingMask key="autoresizingMask"/>
   2.130                                              <subviews>
   2.131                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Server" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TQX-jQ-6wQ">
   2.132 @@ -616,7 +628,7 @@
   2.133                                          <rect key="frame" x="0.0" y="84" width="375" height="49"/>
   2.134                                          <autoresizingMask key="autoresizingMask"/>
   2.135                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Xpq-Fu-Dd3" id="Luz-CL-ptS">
   2.136 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.137 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
   2.138                                              <autoresizingMask key="autoresizingMask"/>
   2.139                                              <subviews>
   2.140                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Port" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="miu-ep-BRp">
   2.141 @@ -652,7 +664,7 @@
   2.142                                          <rect key="frame" x="0.0" y="133" width="375" height="49"/>
   2.143                                          <autoresizingMask key="autoresizingMask"/>
   2.144                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="057-Jd-AD3" id="VC6-Uj-uQb">
   2.145 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.146 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
   2.147                                              <autoresizingMask key="autoresizingMask"/>
   2.148                                              <subviews>
   2.149                                                  <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="H6H-wM-1tb">
   2.150 @@ -738,7 +750,7 @@
   2.151                                          <rect key="frame" x="0.0" y="35" width="375" height="49"/>
   2.152                                          <autoresizingMask key="autoresizingMask"/>
   2.153                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6kU-ew-kCV" id="eXm-f1-cNo">
   2.154 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.155 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
   2.156                                              <autoresizingMask key="autoresizingMask"/>
   2.157                                              <subviews>
   2.158                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Server" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VW4-JJ-HKV">
   2.159 @@ -774,7 +786,7 @@
   2.160                                          <rect key="frame" x="0.0" y="84" width="375" height="49"/>
   2.161                                          <autoresizingMask key="autoresizingMask"/>
   2.162                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XL7-h6-uwJ" id="e4c-NT-9NK">
   2.163 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.164 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
   2.165                                              <autoresizingMask key="autoresizingMask"/>
   2.166                                              <subviews>
   2.167                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Port" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N1c-o2-ebQ">
   2.168 @@ -810,7 +822,7 @@
   2.169                                          <rect key="frame" x="0.0" y="133" width="375" height="49"/>
   2.170                                          <autoresizingMask key="autoresizingMask"/>
   2.171                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="xIb-rc-iWj" id="mpo-zI-aeT">
   2.172 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.173 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="48"/>
   2.174                                              <autoresizingMask key="autoresizingMask"/>
   2.175                                              <subviews>
   2.176                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TransportSecurity" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HKb-4V-2g6">
   2.177 @@ -889,7 +901,7 @@
   2.178                                  <rect key="frame" x="0.0" y="28" width="375" height="44"/>
   2.179                                  <autoresizingMask key="autoresizingMask"/>
   2.180                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uPc-18-CXG" id="IQU-YD-zoF">
   2.181 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.182 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.183                                      <autoresizingMask key="autoresizingMask"/>
   2.184                                  </tableViewCellContentView>
   2.185                              </tableViewCell>
   2.186 @@ -921,26 +933,26 @@
   2.187                          <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
   2.188                          <subviews>
   2.189                              <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AzW-rt-GWz">
   2.190 -                                <rect key="frame" x="16" y="63" width="66" height="30"/>
   2.191 +                                <rect key="frame" x="16" y="107" width="66" height="30"/>
   2.192                                  <state key="normal" title="Copy Log"/>
   2.193                                  <connections>
   2.194                                      <action selector="copyAction:" destination="01V-rr-Nt1" eventType="touchUpInside" id="T5t-mG-hCM"/>
   2.195                                  </connections>
   2.196                              </button>
   2.197                              <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="APq-dm-jI3">
   2.198 -                                <rect key="frame" x="290" y="30" width="51" height="31"/>
   2.199 +                                <rect key="frame" x="290" y="74" width="51" height="31"/>
   2.200                                  <connections>
   2.201                                      <action selector="enableAction:" destination="01V-rr-Nt1" eventType="valueChanged" id="JR9-o2-1qw"/>
   2.202                                  </connections>
   2.203                              </switch>
   2.204                              <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enable/Disable Logging" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Imh-fw-p8J">
   2.205 -                                <rect key="frame" x="16" y="35" width="180" height="20.5"/>
   2.206 +                                <rect key="frame" x="16" y="79" width="180" height="20.5"/>
   2.207                                  <fontDescription key="fontDescription" type="system" pointSize="17"/>
   2.208                                  <nil key="textColor"/>
   2.209                                  <nil key="highlightedColor"/>
   2.210                              </label>
   2.211                              <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3rg-vA-cxG">
   2.212 -                                <rect key="frame" x="0.0" y="100" width="375" height="567"/>
   2.213 +                                <rect key="frame" x="0.0" y="144" width="375" height="523"/>
   2.214                                  <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
   2.215                                  <fontDescription key="fontDescription" type="system" pointSize="14"/>
   2.216                                  <textInputTraits key="textInputTraits" autocapitalizationType="sentences" autocorrectionType="no" spellCheckingType="no"/>
   2.217 @@ -1035,7 +1047,7 @@
   2.218                                          <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.219                                          <autoresizingMask key="autoresizingMask"/>
   2.220                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="LUk-Qy-gDE" id="sNt-IF-jUh">
   2.221 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.222 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.223                                              <autoresizingMask key="autoresizingMask"/>
   2.224                                              <subviews>
   2.225                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Name:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QcW-va-Qh4">
   2.226 @@ -1065,7 +1077,7 @@
   2.227                                          <rect key="frame" x="0.0" y="44" width="375" height="44"/>
   2.228                                          <autoresizingMask key="autoresizingMask"/>
   2.229                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="SCL-dZ-lKy" id="eNg-Rw-EgK">
   2.230 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.231 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.232                                              <autoresizingMask key="autoresizingMask"/>
   2.233                                              <subviews>
   2.234                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Email:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ne5-6o-O4F">
   2.235 @@ -1095,7 +1107,7 @@
   2.236                                          <rect key="frame" x="0.0" y="88" width="375" height="44"/>
   2.237                                          <autoresizingMask key="autoresizingMask"/>
   2.238                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="heV-dy-ZLw" id="uzW-37-XhV">
   2.239 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.240 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.241                                              <autoresizingMask key="autoresizingMask"/>
   2.242                                              <subviews>
   2.243                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Username:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YGG-ns-Pes">
   2.244 @@ -1125,7 +1137,7 @@
   2.245                                          <rect key="frame" x="0.0" y="132" width="375" height="44"/>
   2.246                                          <autoresizingMask key="autoresizingMask"/>
   2.247                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ha3-pb-H6q" id="EaS-It-0GM">
   2.248 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.249 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.250                                              <autoresizingMask key="autoresizingMask"/>
   2.251                                              <subviews>
   2.252                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Password:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="En6-h6-xZD">
   2.253 @@ -1159,7 +1171,7 @@
   2.254                                          <rect key="frame" x="0.0" y="176" width="375" height="44"/>
   2.255                                          <autoresizingMask key="autoresizingMask"/>
   2.256                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Cc3-aU-8MV" id="VDT-D7-V0v">
   2.257 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.258 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.259                                              <autoresizingMask key="autoresizingMask"/>
   2.260                                              <subviews>
   2.261                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Server:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="weI-Bw-0PK">
   2.262 @@ -1189,7 +1201,7 @@
   2.263                                          <rect key="frame" x="0.0" y="220" width="375" height="44"/>
   2.264                                          <autoresizingMask key="autoresizingMask"/>
   2.265                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4xD-xp-8G4" id="c2f-YG-9nA">
   2.266 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.267 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.268                                              <autoresizingMask key="autoresizingMask"/>
   2.269                                              <subviews>
   2.270                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Port:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zDb-ax-ng4">
   2.271 @@ -1219,7 +1231,7 @@
   2.272                                          <rect key="frame" x="0.0" y="264" width="375" height="44"/>
   2.273                                          <autoresizingMask key="autoresizingMask"/>
   2.274                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="YSq-Sp-yAE" id="atq-ig-qWw">
   2.275 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.276 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.277                                              <autoresizingMask key="autoresizingMask"/>
   2.278                                              <subviews>
   2.279                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TransportSecurity:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="daw-LF-EZF">
   2.280 @@ -1253,7 +1265,7 @@
   2.281                                          <rect key="frame" x="0.0" y="308" width="375" height="44"/>
   2.282                                          <autoresizingMask key="autoresizingMask"/>
   2.283                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uQq-jB-jvC" id="oxu-Hi-Kpi">
   2.284 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.285 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.286                                              <autoresizingMask key="autoresizingMask"/>
   2.287                                              <subviews>
   2.288                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Server:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DQ0-sB-CRx">
   2.289 @@ -1283,7 +1295,7 @@
   2.290                                          <rect key="frame" x="0.0" y="352" width="375" height="44"/>
   2.291                                          <autoresizingMask key="autoresizingMask"/>
   2.292                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3ok-CC-12G" id="a25-Mi-BL5">
   2.293 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.294 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.295                                              <autoresizingMask key="autoresizingMask"/>
   2.296                                              <subviews>
   2.297                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Port:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vdb-LS-4JH">
   2.298 @@ -1313,7 +1325,7 @@
   2.299                                          <rect key="frame" x="0.0" y="396" width="375" height="44"/>
   2.300                                          <autoresizingMask key="autoresizingMask"/>
   2.301                                          <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="qam-JB-sRf" id="Cae-Xt-xQe">
   2.302 -                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.303 +                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.304                                              <autoresizingMask key="autoresizingMask"/>
   2.305                                              <subviews>
   2.306                                                  <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TransportSecurity:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hAL-c1-ngD">
   2.307 @@ -1428,7 +1440,7 @@
   2.308                                  <rect key="frame" x="0.0" y="28" width="375" height="50"/>
   2.309                                  <autoresizingMask key="autoresizingMask"/>
   2.310                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ilb-cY-EMj" id="rLG-jZ-OQD">
   2.311 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
   2.312 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.313                                      <autoresizingMask key="autoresizingMask"/>
   2.314                                      <subviews>
   2.315                                          <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KgX-uf-geh">
   2.316 @@ -1504,6 +1516,34 @@
   2.317              </objects>
   2.318              <point key="canvasLocation" x="4185" y="-982"/>
   2.319          </scene>
   2.320 +        <!--Filter Table View Controller-->
   2.321 +        <scene sceneID="9dD-N3-Mae">
   2.322 +            <objects>
   2.323 +                <tableViewController id="nc4-kR-K9D" customClass="FilterTableViewController" customModule="pEpForiOS" customModuleProvider="target" sceneMemberID="viewController">
   2.324 +                    <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="TcR-RD-7eo">
   2.325 +                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
   2.326 +                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
   2.327 +                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
   2.328 +                        <prototypes>
   2.329 +                            <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="filterCell" id="0W6-7M-pNk">
   2.330 +                                <rect key="frame" x="0.0" y="28" width="375" height="44"/>
   2.331 +                                <autoresizingMask key="autoresizingMask"/>
   2.332 +                                <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0W6-7M-pNk" id="rUa-99-bza">
   2.333 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.334 +                                    <autoresizingMask key="autoresizingMask"/>
   2.335 +                                </tableViewCellContentView>
   2.336 +                            </tableViewCell>
   2.337 +                        </prototypes>
   2.338 +                        <connections>
   2.339 +                            <outlet property="dataSource" destination="nc4-kR-K9D" id="Qpl-V8-drd"/>
   2.340 +                            <outlet property="delegate" destination="nc4-kR-K9D" id="Kco-YV-yOE"/>
   2.341 +                        </connections>
   2.342 +                    </tableView>
   2.343 +                </tableViewController>
   2.344 +                <placeholder placeholderIdentifier="IBFirstResponder" id="RS6-O5-yYy" userLabel="First Responder" sceneMemberID="firstResponder"/>
   2.345 +            </objects>
   2.346 +            <point key="canvasLocation" x="4952" y="-690"/>
   2.347 +        </scene>
   2.348          <!--Show email-->
   2.349          <scene sceneID="fxT-br-VYt">
   2.350              <objects>
   2.351 @@ -1517,7 +1557,7 @@
   2.352                                  <rect key="frame" x="0.0" y="28" width="375" height="44"/>
   2.353                                  <autoresizingMask key="autoresizingMask"/>
   2.354                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="LTA-au-2nY" id="UIH-Pp-AmH">
   2.355 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
   2.356 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
   2.357                                      <autoresizingMask key="autoresizingMask"/>
   2.358                                  </tableViewCellContentView>
   2.359                              </tableViewCell>
   2.360 @@ -1525,7 +1565,7 @@
   2.361                                  <rect key="frame" x="0.0" y="72" width="375" height="50"/>
   2.362                                  <autoresizingMask key="autoresizingMask"/>
   2.363                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Hir-dS-fkg" id="0v8-u0-Fch">
   2.364 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
   2.365 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
   2.366                                      <autoresizingMask key="autoresizingMask"/>
   2.367                                      <subviews>
   2.368                                          <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Diese E-Mail ist von einer Mailing-Liste." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BjL-CL-0Cu">
   2.369 @@ -1552,7 +1592,7 @@
   2.370                                  <rect key="frame" x="0.0" y="122" width="375" height="72"/>
   2.371                                  <autoresizingMask key="autoresizingMask"/>
   2.372                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="kFd-Le-QvU" id="dlZ-8o-1iE">
   2.373 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="72"/>
   2.374 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="71"/>
   2.375                                      <autoresizingMask key="autoresizingMask"/>
   2.376                                      <subviews>
   2.377                                          <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="To: Recipients" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mfx-AS-hpP">
   2.378 @@ -1587,7 +1627,7 @@
   2.379                                  <rect key="frame" x="0.0" y="194" width="375" height="72"/>
   2.380                                  <autoresizingMask key="autoresizingMask"/>
   2.381                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="w8o-Py-AVt" id="0wZ-Iy-bZj">
   2.382 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="72"/>
   2.383 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="71"/>
   2.384                                      <autoresizingMask key="autoresizingMask"/>
   2.385                                      <subviews>
   2.386                                          <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Swb-L2-8yp">
   2.387 @@ -1621,11 +1661,11 @@
   2.388                                  <rect key="frame" x="0.0" y="266" width="375" height="200"/>
   2.389                                  <autoresizingMask key="autoresizingMask"/>
   2.390                                  <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="emX-Ao-r5Q" id="Tft-DN-iZy">
   2.391 -                                    <rect key="frame" x="0.0" y="0.0" width="375" height="200"/>
   2.392 +                                    <rect key="frame" x="0.0" y="0.0" width="375" height="199"/>
   2.393                                      <autoresizingMask key="autoresizingMask"/>
   2.394                                      <subviews>
   2.395                                          <webView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Aso-tc-Ukd">
   2.396 -                                            <rect key="frame" x="-4" y="-4" width="373" height="190"/>
   2.397 +                                            <rect key="frame" x="-5" y="-5" width="373" height="188"/>
   2.398                                              <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
   2.399                                              <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
   2.400                                              <dataDetectorType key="dataDetectorTypes" phoneNumber="YES" link="YES"/>
   2.401 @@ -2467,9 +2507,9 @@
   2.402          <image name="unread-icon" width="22" height="22"/>
   2.403      </resources>
   2.404      <inferredMetricsTieBreakers>
   2.405 -        <segue reference="coo-Nc-XpZ"/>
   2.406          <segue reference="Na7-CM-lbe"/>
   2.407 +        <segue reference="VUg-YY-vSY"/>
   2.408 +        <segue reference="xmi-xn-p8T"/>
   2.409          <segue reference="FBd-9l-9Iu"/>
   2.410 -        <segue reference="1zD-EW-3fN"/>
   2.411      </inferredMetricsTieBreakers>
   2.412  </document>
     3.1 --- a/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Tue Mar 14 10:32:26 2017 +0100
     3.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Mon Mar 13 16:10:34 2017 +0100
     3.3 @@ -49,6 +49,8 @@
     3.4              return
     3.5          }
     3.6  
     3.7 +        self.textFilterButton.isEnabled = filterEnabled
     3.8 +
     3.9          setDefaultColors()
    3.10          initialConfig()
    3.11          updateModel()
    3.12 @@ -83,13 +85,34 @@
    3.13          tableView.setContentOffset(CGPoint(x: 0.0, y: 40.0), animated: false)
    3.14      }
    3.15  
    3.16 -
    3.17 -    @IBAction func showUnreadButtonTapped(_ sender: UIBarButtonItem) {}
    3.18 -
    3.19      func updateModel() {
    3.20          tableView.reloadData()
    3.21      }
    3.22  
    3.23 +
    3.24 +    private var filterEnabled = false
    3.25 +    @IBOutlet weak var enableFilterButton: UIBarButtonItem!
    3.26 +    @IBOutlet weak var textFilterButton: UIBarButtonItem!
    3.27 +    @IBAction func showUnreadButtonTapped(_ sender: UIBarButtonItem) {
    3.28 +        if filterEnabled {
    3.29 +            filterEnabled = false
    3.30 +            textFilterButton.title = ""
    3.31 +            enableFilterButton.image = UIImage(named: "unread-icon")
    3.32 +            config?.folder?.updateFilter(filter: Filter.unified())
    3.33 +            self.tableView.reloadData()
    3.34 +        } else {
    3.35 +            filterEnabled = true
    3.36 +            textFilterButton.title = "Filter by: unread"
    3.37 +            enableFilterButton.image = UIImage(named: "unread-icon-active")
    3.38 +            if config != nil {
    3.39 +                config?.folder?.updateFilter(filter: Filter.unread())
    3.40 +                self.tableView.reloadData()
    3.41 +            }
    3.42 +        }
    3.43 +        self.textFilterButton.isEnabled = filterEnabled
    3.44 +
    3.45 +    }
    3.46 +
    3.47      // MARK: - UI State
    3.48  
    3.49      func updateUI() {
     4.1 --- a/pEpForiOS/UI/EmailDisplay/FlagImages.swift	Tue Mar 14 10:32:26 2017 +0100
     4.2 +++ b/pEpForiOS/UI/EmailDisplay/FlagImages.swift	Mon Mar 13 16:10:34 2017 +0100
     4.3 @@ -32,6 +32,8 @@
     4.4      public private(set) var flaggedImage: UIImage?
     4.5      public private(set) var notSeenImage: UIImage?
     4.6      public private(set) var flaggedAndNotSeenImage: UIImage?
     4.7 +    public private(set) var toMeImage: UIImage?
     4.8 +    public private(set) var toMeCcImage: UIImage?
     4.9  
    4.10      fileprivate init(imageSize: CGSize) {
    4.11          self.imageSize = imageSize
    4.12 @@ -39,13 +41,17 @@
    4.13      }
    4.14  
    4.15      func createImages() {
    4.16 -        var circleSize = imageSize
    4.17 -        flaggedImage = createCircleImage(size: circleSize, color: .orange)
    4.18 -        notSeenImage = createCircleImage(size: circleSize, color: .blue)
    4.19 +        var size = imageSize
    4.20 +        let textTo = NSLocalizedString("TO", comment: "to me image text") as NSString
    4.21 +        let textToCc = NSLocalizedString("CC", comment: "to me image text") as NSString
    4.22 +        flaggedImage = createCircleImage(size: size, color: .orange)
    4.23 +        notSeenImage = createCircleImage(size: size, color: .blue)
    4.24 +        toMeImage = createSquareImage(size: textTo.size(), color: .lightGray, text: textTo)
    4.25 +        toMeCcImage = createSquareImage(size: textToCc.size(), color: .lightGray, text: textToCc)
    4.26  
    4.27 -        circleSize.width -= 5
    4.28 -        circleSize.height -= 5
    4.29 -        let flaggedImageSmall = createCircleImage(size: circleSize, color: .orange)
    4.30 +        size.width -= 5
    4.31 +        size.height -= 5
    4.32 +        let flaggedImageSmall = createCircleImage(size: size, color: .orange)
    4.33  
    4.34          flaggedAndNotSeenImage = createImageOverlay(
    4.35              size: imageSize, images: [notSeenImage, flaggedImageSmall])
    4.36 @@ -76,6 +82,33 @@
    4.37          })
    4.38      }
    4.39  
    4.40 +    func createSquareImage(size: CGSize, color: UIColor, text: NSString) -> UIImage? {
    4.41 +        let image = produceImage(size: size, block: { ctx in
    4.42 +            ctx.setFillColor(color.cgColor)
    4.43 +            ctx.setStrokeColor(color.cgColor)
    4.44 +            let r = CGRect.init(origin: CGPoint(x: 0.0, y: 0.0), size: size)
    4.45 +            let path = UIBezierPath(roundedRect: r, cornerRadius: 2.5)
    4.46 +            ctx.addPath(path.cgPath)
    4.47 +            ctx.fillPath()
    4.48 +        })
    4.49 +        return addTextToImage(image: image, text: text)
    4.50 +    }
    4.51 +
    4.52 +    func addTextToImage(image: UIImage?, text: NSString) -> UIImage? {
    4.53 +        let textFontAttributes = [
    4.54 +            NSFontAttributeName: UIFont(name: "Helvetica Bold", size: 10)!,
    4.55 +            NSForegroundColorAttributeName: UIColor.white,
    4.56 +            ] as [String : Any]
    4.57 +
    4.58 +            UIGraphicsBeginImageContextWithOptions((image?.size)!, false, 0.0)
    4.59 +            image?.draw(in: CGRect(origin: CGPoint.zero, size: (image?.size)!))
    4.60 +            let rect = CGRect(origin: CGPoint(x: 1, y: 1), size: (image?.size)!)
    4.61 +            text.draw(in: rect, withAttributes: textFontAttributes)
    4.62 +            let newImage = UIGraphicsGetImageFromCurrentImageContext()
    4.63 +            UIGraphicsEndImageContext()
    4.64 +            return newImage
    4.65 +    }
    4.66 +
    4.67      func produceImage(size: CGSize, block: (CGContext) -> ()) -> UIImage? {
    4.68          var theImage: UIImage?
    4.69          UIGraphicsBeginImageContextWithOptions(size, false, 0.0)
    4.70 @@ -84,6 +117,7 @@
    4.71              theImage = UIGraphicsGetImageFromCurrentImageContext()
    4.72          }
    4.73          UIGraphicsEndImageContext()
    4.74 +
    4.75          return theImage
    4.76      }
    4.77  }
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/pEpForiOS/UI/Filter/FilterTableViewController.swift	Mon Mar 13 16:10:34 2017 +0100
     5.3 @@ -0,0 +1,127 @@
     5.4 +//
     5.5 +//  FilterTableViewController.swift
     5.6 +//  pEpForiOS
     5.7 +//
     5.8 +//  Created by Xavier Algarra on 13/03/2017.
     5.9 +//  Copyright © 2017 p≡p Security S.A. All rights reserved.
    5.10 +//
    5.11 +
    5.12 +import UIKit
    5.13 +
    5.14 +class FilterTableViewController: UITableViewController {
    5.15 +
    5.16 +    open var inFolder: Bool = false
    5.17 +
    5.18 +    var sections = [FilterViewModel]()
    5.19 +
    5.20 +    override func viewDidLoad() {
    5.21 +        super.viewDidLoad()
    5.22 +
    5.23 +        // Uncomment the following line to preserve selection between presentations
    5.24 +        // self.clearsSelectionOnViewWillAppear = false
    5.25 +
    5.26 +        // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    5.27 +        // self.navigationItem.rightBarButtonItem = self.editButtonItem()
    5.28 +    }
    5.29 +
    5.30 +    override func viewWillAppear(_ animated: Bool) {
    5.31 +        initViewModel()
    5.32 +
    5.33 +    }
    5.34 +
    5.35 +    func initViewModel() {
    5.36 +        if !inFolder {
    5.37 +            sections.append(FilterViewModel(type: .accouts))
    5.38 +        }
    5.39 +        sections.append(FilterViewModel(type: .include))
    5.40 +        sections.append(FilterViewModel(type: .to))
    5.41 +        sections.append(FilterViewModel(type: .other))
    5.42 +    }
    5.43 +
    5.44 +    override func didReceiveMemoryWarning() {
    5.45 +        super.didReceiveMemoryWarning()
    5.46 +        // Dispose of any resources that can be recreated.
    5.47 +    }
    5.48 +
    5.49 +    // MARK: - Table view data source
    5.50 +
    5.51 +    override func numberOfSections(in tableView: UITableView) -> Int {
    5.52 +        // #warning Incomplete implementation, return the number of sections
    5.53 +        return sections.count
    5.54 +    }
    5.55 +
    5.56 +    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    5.57 +        // #warning Incomplete implementation, return the number of rows
    5.58 +        return sections[section].count
    5.59 +    }
    5.60 +
    5.61 +    override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
    5.62 +        return sections[section].title
    5.63 +    }
    5.64 +    override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
    5.65 +        return 40.0
    5.66 +    }
    5.67 +
    5.68 +    override func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
    5.69 +
    5.70 +        let header = view as! UITableViewHeaderFooterView
    5.71 +        header.textLabel?.font = UIFont(name: "Futura", size: 11)
    5.72 +        header.textLabel?.textColor = UIColor.lightGray
    5.73 +
    5.74 +    }
    5.75 +
    5.76 +    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    5.77 +        let cell = tableView.dequeueReusableCell(withIdentifier: "filterCell", for: indexPath)
    5.78 +        //cell.imageView?.image = FlagImages.create(imageSize: cell.imageView?.image).flaggedImage
    5.79 +        let cellvm = sections[indexPath.section][indexPath.row]
    5.80 +        cell.textLabel?.text = cellvm.title
    5.81 +        cell.imageView?.image = cellvm.icon
    5.82 +        return cell
    5.83 +    }
    5.84 +
    5.85 +    /*
    5.86 +    // Override to support conditional editing of the table view.
    5.87 +    override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
    5.88 +        // Return false if you do not want the specified item to be editable.
    5.89 +        return true
    5.90 +    }
    5.91 +    */
    5.92 +
    5.93 +    /*
    5.94 +    // Override to support editing the table view.
    5.95 +    override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
    5.96 +        if editingStyle == .delete {
    5.97 +            // Delete the row from the data source
    5.98 +            tableView.deleteRows(at: [indexPath], with: .fade)
    5.99 +        } else if editingStyle == .insert {
   5.100 +            // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
   5.101 +        }    
   5.102 +    }
   5.103 +    */
   5.104 +
   5.105 +    /*
   5.106 +    // Override to support rearranging the table view.
   5.107 +    override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {
   5.108 +
   5.109 +    }
   5.110 +    */
   5.111 +
   5.112 +    /*
   5.113 +    // Override to support conditional rearranging of the table view.
   5.114 +    override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
   5.115 +        // Return false if you do not want the item to be re-orderable.
   5.116 +        return true
   5.117 +    }
   5.118 +    */
   5.119 +
   5.120 +    /*
   5.121 +    // MARK: - Navigation
   5.122 +
   5.123 +    // In a storyboard-based application, you will often want to do a little preparation before navigation
   5.124 +    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
   5.125 +        // Get the new view controller using segue.destinationViewController.
   5.126 +        // Pass the selected object to the new view controller.
   5.127 +    }
   5.128 +    */
   5.129 +
   5.130 +}
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/pEpForiOS/UI/Filter/ViewModel/FilterCellViewModel.swift	Mon Mar 13 16:10:34 2017 +0100
     6.3 @@ -0,0 +1,75 @@
     6.4 +//
     6.5 +//  FilterCellViewModel.swift
     6.6 +//  pEpForiOS
     6.7 +//
     6.8 +//  Created by Xavier Algarra on 13/03/2017.
     6.9 +//  Copyright © 2017 p≡p Security S.A. All rights reserved.
    6.10 +//
    6.11 +
    6.12 +import Foundation
    6.13 +import MessageModel
    6.14 +
    6.15 +public enum FilterCellType {
    6.16 +    case unread, indicate, forMe, forMeCc, attachment
    6.17 +}
    6.18 +
    6.19 +public class FilterCellViewModel {
    6.20 +
    6.21 +    var account: Account?
    6.22 +    var icon: UIImage
    6.23 +    var title: String
    6.24 +
    6.25 +    init(account _account: Account) {
    6.26 +        self.account = _account
    6.27 +        self.icon = UIImage(named: "folders-icon-inbox")!
    6.28 +        self.title = ""
    6.29 +        if let acc = account {
    6.30 +            self.title = acc.user.address
    6.31 +        }
    6.32 +    }
    6.33 +
    6.34 +    init(type: FilterCellType) {
    6.35 +        let circleSize = CGSize(width: 14, height: 14)
    6.36 +        let squareSize = CGSize(width: 20, height: 14)
    6.37 +        switch type {
    6.38 +        case .unread:
    6.39 +            guard let image = FlagImages.create(imageSize: circleSize).notSeenImage else {
    6.40 +                self.icon = UIImage(named: "folders-icon-inbox")!
    6.41 +                title = "aa"
    6.42 +                return
    6.43 +            }
    6.44 +            icon = image
    6.45 +            title = NSLocalizedString("Unread", comment: "title unread filter cell")
    6.46 +        case .indicate:
    6.47 +            guard let image = FlagImages.create(imageSize: circleSize).flaggedImage else {
    6.48 +                self.icon = UIImage(named: "folders-icon-inbox")!
    6.49 +                title = "aa"
    6.50 +                return
    6.51 +            }
    6.52 +            icon = image
    6.53 +            title = NSLocalizedString("Flagged", comment: "title unread filter cell")
    6.54 +        case .forMe:
    6.55 +            guard let image = FlagImages.create(imageSize: squareSize).toMeImage else {
    6.56 +                self.icon = UIImage(named: "folders-icon-inbox")!
    6.57 +                title = "aa"
    6.58 +                return
    6.59 +            }
    6.60 +            icon = image
    6.61 +            title = NSLocalizedString("For me", comment: "title unread filter cell")
    6.62 +        case .forMeCc:
    6.63 +            guard let image = FlagImages.create(imageSize: squareSize).toMeCcImage else {
    6.64 +                self.icon = UIImage(named: "folders-icon-inbox")!
    6.65 +                title = "aa"
    6.66 +                return
    6.67 +            }
    6.68 +            icon = image
    6.69 +            title = NSLocalizedString("For me in copy", comment: "title unread filter cell")
    6.70 +
    6.71 +        default:
    6.72 +            self.icon = UIImage(named: "folders-icon-inbox")!
    6.73 +            title = "aa"
    6.74 +            break
    6.75 +        }
    6.76 +    }
    6.77 +    
    6.78 +}
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/pEpForiOS/UI/Filter/ViewModel/FilterViewModel.swift	Mon Mar 13 16:10:34 2017 +0100
     7.3 @@ -0,0 +1,72 @@
     7.4 +//
     7.5 +//  FilterViewModel.swift
     7.6 +//  pEpForiOS
     7.7 +//
     7.8 +//  Created by Xavier Algarra on 13/03/2017.
     7.9 +//  Copyright © 2017 p≡p Security S.A. All rights reserved.
    7.10 +//
    7.11 +
    7.12 +import Foundation
    7.13 +import MessageModel
    7.14 +
    7.15 +public enum FilterSectionType {
    7.16 +    case accouts, include, to, other
    7.17 +}
    7.18 +public class FilterViewModel {
    7.19 +
    7.20 +    private var items: [FilterCellViewModel]
    7.21 +    public var title: String
    7.22 +
    7.23 +    public init(type: FilterSectionType) {
    7.24 +
    7.25 +        items = [FilterCellViewModel]()
    7.26 +        switch type {
    7.27 +        case .accouts:
    7.28 +            self.title = NSLocalizedString("INCLUDE MAIL FROM:", comment: "title for the accounts section")
    7.29 +            break
    7.30 +        case .include:
    7.31 +            self.title = NSLocalizedString("INCLUDE:", comment: "title for the include section")
    7.32 +            break
    7.33 +        case .to:
    7.34 +            self.title = NSLocalizedString("ADDRESSED TO:", comment: "title for the to section")
    7.35 +            break
    7.36 +        case .other:
    7.37 +            self.title = ""
    7.38 +            break
    7.39 +        }
    7.40 +
    7.41 +        generateCells(type: type)
    7.42 +
    7.43 +    }
    7.44 +
    7.45 +    private func generateCells(type: FilterSectionType) {
    7.46 +        switch type {
    7.47 +        case .accouts:
    7.48 +            for account in Account.all() {
    7.49 +                items.append(FilterCellViewModel(account: account))
    7.50 +            }
    7.51 +            break
    7.52 +        case .include:
    7.53 +            items.append(FilterCellViewModel(type: FilterCellType.unread))
    7.54 +            items.append(FilterCellViewModel(type: FilterCellType.indicate))
    7.55 +            break
    7.56 +        case .to:
    7.57 +            items.append(FilterCellViewModel(type: FilterCellType.forMe))
    7.58 +            items.append(FilterCellViewModel(type: FilterCellType.forMeCc))
    7.59 +            break
    7.60 +        case .other:
    7.61 +            //init de las celdas otros
    7.62 +            break
    7.63 +        }
    7.64 +    }
    7.65 +
    7.66 +
    7.67 +    subscript(index: Int) -> FilterCellViewModel {
    7.68 +        get {
    7.69 +            return self.items[index]
    7.70 +        }
    7.71 +    }
    7.72 +    var count : Int {
    7.73 +        return self.items.count
    7.74 +    }
    7.75 +}