瀏覽代碼

clear code

Marino Faggiana 8 年之前
父節點
當前提交
cfab9db3dd

+ 9 - 9
iOSClient/Favorites/CCFavorites.m

@@ -641,8 +641,8 @@
     cell.separatorInset = UIEdgeInsetsMake(0.f, 60.f, 0.f, 0.f);
     
     // Initialize
-    cell.statusImageView.image = nil;
-    cell.offlineImageView.image = nil;
+    cell.status.image = nil;
+    cell.favorite.image = nil;
         
     // change color selection
     UIView *selectionColor = [[UIView alloc] init];
@@ -651,12 +651,12 @@
     
     metadata = [_dataSource objectAtIndex:indexPath.row];
         
-    cell.fileImageView.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID]];
+    cell.file.image = [UIImage imageWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID]];
         
     if (_serverUrl == nil)
-        cell.offlineImageView.image = [UIImage imageNamed:@"favorite"];
+        cell.favorite.image = [UIImage imageNamed:@"favorite"];
     
-    if (cell.fileImageView.image == nil && metadata.thumbnailExists)
+    if (cell.file.image == nil && metadata.thumbnailExists)
         [[CCActions sharedInstance] downloadTumbnail:metadata delegate:self];
     
     // encrypted color
@@ -671,21 +671,21 @@
     cell.labelInfoFile.text = @"";
     
     // Immagine del file, se non c'è l'anteprima mettiamo quella standard
-    if (cell.fileImageView.image == nil) {
+    if (cell.file.image == nil) {
         
         if (metadata.directory) {
             
-            cell.fileImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:metadata.iconName] color:[NCBrandColor sharedInstance].brand];
+            cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:metadata.iconName] color:[NCBrandColor sharedInstance].brand];
             
         } else {
             
-            cell.fileImageView.image = [UIImage imageNamed:metadata.iconName];
+            cell.file.image = [UIImage imageNamed:metadata.iconName];
         }
     }
     
     // it's encrypted ???
     if (metadata.cryptated && [metadata.type isEqualToString: k_metadataType_template] == NO)
-        cell.statusImageView.image = [UIImage imageNamed:@"lock"];
+        cell.status.image = [UIImage imageNamed:@"lock"];
     
     // text and length
     if (metadata.directory) {

+ 3 - 3
iOSClient/Favorites/CCFavoritesCell.h

@@ -25,9 +25,9 @@
 
 @interface CCFavoritesCell : UITableViewCell
 
-@property(nonatomic, weak) IBOutlet UIImageView *fileImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *statusImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *offlineImageView;
+@property(nonatomic, weak) IBOutlet UIImageView *file;
+@property(nonatomic, weak) IBOutlet UIImageView *status;
+@property(nonatomic, weak) IBOutlet UIImageView *favorite;
 
 @property(nonatomic, weak) IBOutlet UILabel *labelTitle;
 @property(nonatomic, weak) IBOutlet UILabel *labelInfoFile;

+ 9 - 9
iOSClient/Favorites/CCFavoritesCell.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
         <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -16,7 +16,7 @@
             <rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="2" id="sQq-jC-UEV">
-                <rect key="frame" x="0.0" y="0.0" width="600" height="59.5"/>
+                <rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <label opaque="NO" userInteractionEnabled="NO" tag="101" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QNC-8X-DAC">
@@ -33,7 +33,7 @@
                         </constraints>
                     </imageView>
                     <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DQR-yN-JaH">
-                        <rect key="frame" x="37" y="40" width="15" height="15"/>
+                        <rect key="frame" x="40" y="40" width="15" height="15"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="15" id="O4C-De-dnI"/>
                             <constraint firstAttribute="height" constant="15" id="bun-Ao-Ysu"/>
@@ -45,7 +45,7 @@
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dhG-hb-z3n" userLabel="Offline Image View">
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dhG-hb-z3n" userLabel="Favorite">
                         <rect key="frame" x="4" y="40" width="15" height="15"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="15" id="ZiA-bt-IkC"/>
@@ -56,7 +56,7 @@
                 <constraints>
                     <constraint firstItem="DQR-yN-JaH" firstAttribute="top" secondItem="dhG-hb-z3n" secondAttribute="top" id="0XU-Ho-ald"/>
                     <constraint firstItem="5" firstAttribute="leading" secondItem="sQq-jC-UEV" secondAttribute="leadingMargin" constant="2" id="1yX-Zr-1lx"/>
-                    <constraint firstItem="p7I-KN-FVZ" firstAttribute="leading" secondItem="DQR-yN-JaH" secondAttribute="trailing" constant="8" id="2xR-G4-B2S"/>
+                    <constraint firstItem="p7I-KN-FVZ" firstAttribute="leading" secondItem="DQR-yN-JaH" secondAttribute="trailing" constant="5" id="2xR-G4-B2S"/>
                     <constraint firstItem="dhG-hb-z3n" firstAttribute="top" secondItem="sQq-jC-UEV" secondAttribute="topMargin" constant="32" id="4Zy-SY-nfT"/>
                     <constraint firstItem="QNC-8X-DAC" firstAttribute="trailing" secondItem="sQq-jC-UEV" secondAttribute="trailingMargin" constant="-59" id="7zt-c0-CsI"/>
                     <constraint firstAttribute="centerY" secondItem="5" secondAttribute="centerY" id="FQP-wg-vPF"/>
@@ -69,11 +69,11 @@
                 </constraints>
             </tableViewCellContentView>
             <connections>
-                <outlet property="fileImageView" destination="5" id="6"/>
+                <outlet property="favorite" destination="dhG-hb-z3n" id="kJu-nV-Vcb"/>
+                <outlet property="file" destination="5" id="whc-SL-Hxm"/>
                 <outlet property="labelInfoFile" destination="p7I-KN-FVZ" id="5Yb-hH-k73"/>
                 <outlet property="labelTitle" destination="QNC-8X-DAC" id="dFX-Cb-8IE"/>
-                <outlet property="offlineImageView" destination="dhG-hb-z3n" id="IGh-6c-M89"/>
-                <outlet property="statusImageView" destination="DQR-yN-JaH" id="UmC-pt-kjV"/>
+                <outlet property="status" destination="DQR-yN-JaH" id="xh2-y1-GlP"/>
             </connections>
             <point key="canvasLocation" x="256" y="19"/>
         </tableViewCell>

+ 5 - 5
iOSClient/Main/CCCellMain.h

@@ -25,11 +25,11 @@
 
 @interface CCCellMain : UITableViewCell
 
-@property(nonatomic, weak) IBOutlet UIImageView *fileImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *statusImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *offlineImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *synchronizedImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *sharedImageView;
+@property(nonatomic, weak) IBOutlet UIImageView *file;
+@property(nonatomic, weak) IBOutlet UIImageView *status;
+@property(nonatomic, weak) IBOutlet UIImageView *favorite;
+@property(nonatomic, weak) IBOutlet UIImageView *local;
+@property(nonatomic, weak) IBOutlet UIImageView *shared;
 
 @property(nonatomic, weak) IBOutlet UILabel *labelTitle;
 @property(nonatomic, weak) IBOutlet UILabel *labelInfoFile;

+ 19 - 19
iOSClient/Main/CCCellMain.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
         <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -16,7 +16,7 @@
             <rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="2" id="sQq-jC-UEV">
-                <rect key="frame" x="0.0" y="0.0" width="600" height="59.5"/>
+                <rect key="frame" x="0.0" y="0.0" width="600" height="60"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <label opaque="NO" userInteractionEnabled="NO" tag="101" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QNC-8X-DAC">
@@ -44,33 +44,34 @@
                             <constraint firstAttribute="width" constant="40" id="kM5-Uf-S8Z"/>
                         </constraints>
                     </imageView>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DQR-yN-JaH">
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DQR-yN-JaH" userLabel="Status">
                         <rect key="frame" x="39" y="40" width="15" height="15"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="15" id="bgo-QS-x7k"/>
                             <constraint firstAttribute="width" constant="15" id="g4P-aH-jOh"/>
                         </constraints>
                     </imageView>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="X2D-15-9A2" userLabel="Synchronized Image View">
-                        <rect key="frame" x="23" y="23" width="15" height="15"/>
-                        <constraints>
-                            <constraint firstAttribute="height" constant="15" id="bym-Ey-cZ0"/>
-                            <constraint firstAttribute="width" constant="15" id="kOT-hZ-NLn"/>
-                        </constraints>
-                    </imageView>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Fw2-NW-hsK" userLabel="Offline Image View">
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Fw2-NW-hsK" userLabel="Favorite">
                         <rect key="frame" x="4" y="40" width="15" height="15"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="15" id="EkP-Tz-P1M"/>
                             <constraint firstAttribute="height" constant="15" id="lkK-a4-Q2V"/>
                         </constraints>
                     </imageView>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="QQH-5M-Zyv">
+                        <rect key="frame" x="39" y="4" width="15" height="15"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="15" id="MT4-aL-Ops"/>
+                            <constraint firstAttribute="height" constant="15" id="Oxa-YI-vu7"/>
+                        </constraints>
+                    </imageView>
                 </subviews>
                 <color key="tintColor" red="1" green="0.5" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                 <constraints>
+                    <constraint firstItem="QQH-5M-Zyv" firstAttribute="leading" secondItem="5" secondAttribute="trailing" constant="-11" id="0oA-OR-crI"/>
                     <constraint firstItem="Fw2-NW-hsK" firstAttribute="bottom" secondItem="p7I-KN-FVZ" secondAttribute="bottom" constant="7.5" id="8pv-VG-6Jh"/>
-                    <constraint firstAttribute="topMargin" secondItem="X2D-15-9A2" secondAttribute="top" constant="-15" id="BTB-e6-eQo"/>
                     <constraint firstItem="DQR-yN-JaH" firstAttribute="top" secondItem="p7I-KN-FVZ" secondAttribute="top" constant="7" id="Bus-ts-kJv"/>
+                    <constraint firstItem="5" firstAttribute="top" secondItem="QQH-5M-Zyv" secondAttribute="bottom" constant="-9" id="IWF-4x-NTs"/>
                     <constraint firstItem="5" firstAttribute="top" secondItem="sQq-jC-UEV" secondAttribute="topMargin" constant="2" id="JnQ-te-G7i"/>
                     <constraint firstItem="5" firstAttribute="top" secondItem="QNC-8X-DAC" secondAttribute="top" constant="-3" id="L4F-9B-vke"/>
                     <constraint firstItem="5" firstAttribute="bottom" secondItem="p7I-KN-FVZ" secondAttribute="bottom" constant="2.5" id="N38-yB-Rf0"/>
@@ -81,7 +82,6 @@
                     <constraint firstItem="qhJ-el-R92" firstAttribute="centerY" secondItem="sQq-jC-UEV" secondAttribute="centerY" id="hza-t5-cJG"/>
                     <constraint firstItem="5" firstAttribute="leading" secondItem="sQq-jC-UEV" secondAttribute="leadingMargin" constant="2" id="jRD-Qd-3a9"/>
                     <constraint firstItem="p7I-KN-FVZ" firstAttribute="leading" secondItem="DQR-yN-JaH" secondAttribute="trailing" constant="6" id="mRY-av-dw7"/>
-                    <constraint firstItem="X2D-15-9A2" firstAttribute="leading" secondItem="sQq-jC-UEV" secondAttribute="leadingMargin" constant="15" id="qMP-N3-wcV"/>
                     <constraint firstItem="qhJ-el-R92" firstAttribute="trailing" secondItem="QNC-8X-DAC" secondAttribute="trailing" constant="50" id="rtM-Ct-ErW"/>
                     <constraint firstAttribute="trailingMargin" secondItem="p7I-KN-FVZ" secondAttribute="trailing" constant="42" id="vpn-rQ-Wr4"/>
                     <constraint firstItem="qhJ-el-R92" firstAttribute="trailing" secondItem="sQq-jC-UEV" secondAttribute="trailingMargin" constant="8" id="yYu-48-Zqf"/>
@@ -89,13 +89,13 @@
             </tableViewCellContentView>
             <gestureRecognizers/>
             <connections>
-                <outlet property="fileImageView" destination="5" id="6"/>
+                <outlet property="favorite" destination="Fw2-NW-hsK" id="YRw-hZ-kaI"/>
+                <outlet property="file" destination="5" id="Lfe-3W-yYr"/>
                 <outlet property="labelInfoFile" destination="p7I-KN-FVZ" id="5Yb-hH-k73"/>
                 <outlet property="labelTitle" destination="QNC-8X-DAC" id="dFX-Cb-8IE"/>
-                <outlet property="offlineImageView" destination="Fw2-NW-hsK" id="5K1-gW-R2J"/>
-                <outlet property="sharedImageView" destination="qhJ-el-R92" id="UfT-CJ-QTC"/>
-                <outlet property="statusImageView" destination="DQR-yN-JaH" id="UmC-pt-kjV"/>
-                <outlet property="synchronizedImageView" destination="X2D-15-9A2" id="ssy-oV-gLg"/>
+                <outlet property="local" destination="QQH-5M-Zyv" id="9bD-k7-sFk"/>
+                <outlet property="shared" destination="qhJ-el-R92" id="qXO-Vc-N0d"/>
+                <outlet property="status" destination="DQR-yN-JaH" id="W7R-GV-6wP"/>
             </connections>
             <point key="canvasLocation" x="415" y="169"/>
         </tableViewCell>

+ 5 - 5
iOSClient/Main/CCCellMainTransfer.h

@@ -25,11 +25,11 @@
 
 @interface CCCellMainTransfer : UITableViewCell
 
-@property(nonatomic, weak) IBOutlet UIImageView *fileImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *statusImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *offlineImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *synchronizedImageView;
-@property(nonatomic, weak) IBOutlet UIImageView *sharedImageView;
+@property(nonatomic, weak) IBOutlet UIImageView *file;
+@property(nonatomic, weak) IBOutlet UIImageView *status;
+@property(nonatomic, weak) IBOutlet UIImageView *favorite;
+@property(nonatomic, weak) IBOutlet UIImageView *local;
+@property(nonatomic, weak) IBOutlet UIImageView *shared;
 
 @property(nonatomic, weak) IBOutlet UILabel *labelTitle;
 @property(nonatomic, weak) IBOutlet UILabel *labelInfoFile;

+ 6 - 6
iOSClient/Main/CCCellMainTransfer.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
         <capability name="Alignment constraints to the first baseline" minToolsVersion="6.0"/>
         <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -32,13 +32,13 @@
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.63921568627450975" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5">
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5" userLabel="File">
                         <rect key="frame" x="10" y="10" width="40" height="40"/>
                         <constraints>
                             <constraint firstAttribute="width" constant="40" id="kM5-Uf-S8Z"/>
                         </constraints>
                     </imageView>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DQR-yN-JaH">
+                    <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DQR-yN-JaH" userLabel="Image">
                         <rect key="frame" x="39" y="40" width="15" height="15"/>
                         <constraints>
                             <constraint firstAttribute="height" constant="15" id="bgo-QS-x7k"/>
@@ -110,12 +110,12 @@
             </tableViewCellContentView>
             <connections>
                 <outlet property="cancelTaskButton" destination="eGg-ei-EiX" id="08u-FB-UcL"/>
-                <outlet property="fileImageView" destination="5" id="IKO-eX-pd2"/>
+                <outlet property="file" destination="5" id="h6v-aL-JbR"/>
                 <outlet property="labelInfoFile" destination="p7I-KN-FVZ" id="bIH-yL-aSv"/>
                 <outlet property="labelTitle" destination="QNC-8X-DAC" id="coV-Xj-n1Q"/>
                 <outlet property="progressView" destination="Q4M-4B-abs" id="Ouc-sW-VLX"/>
                 <outlet property="reloadTaskButton" destination="Kaz-0H-BSt" id="hOL-f8-R0r"/>
-                <outlet property="statusImageView" destination="DQR-yN-JaH" id="wGV-fc-S5H"/>
+                <outlet property="status" destination="DQR-yN-JaH" id="neR-jW-zwL"/>
                 <outlet property="stopTaskButton" destination="Dge-D1-XMk" id="UZF-RR-oCy"/>
             </connections>
             <point key="canvasLocation" x="414" y="244"/>

+ 0 - 1
iOSClient/Main/CCMain.h

@@ -93,7 +93,6 @@
 - (void)requestServerCapabilities;
 
 - (void)openWindowShare:(tableMetadata *)metadata;
-- (void)synchronizeFolderGraphicsServerUrl:(NSString *)serverUrl animation:(BOOL)animation;
 - (void)clearDateReadDataSource:(NSNotification *)notification;
 - (void)cancelSearchBar;
 

+ 43 - 87
iOSClient/Main/CCMain.m

@@ -1319,9 +1319,9 @@
         
         cell = [self.tableView cellForRowAtIndexPath:indexPath];
         
-        cell.fileImageView.image = [app.icoImagesCache objectForKey:metadataNet.fileID];
+        cell.file.image = [app.icoImagesCache objectForKey:metadataNet.fileID];
         
-        if (cell.fileImageView.image == nil) {
+        if (cell.file.image == nil) {
             
             dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
                 
@@ -4964,11 +4964,11 @@
     // DEFAULT
     // ----------------------------------------------------------------------------------------------------------
     
-    cell.fileImageView.image = nil;
-    cell.statusImageView.image = nil;
-    cell.offlineImageView.image = nil;
-    cell.synchronizedImageView.image = nil;
-    cell.sharedImageView.image = nil;
+    cell.file.image = nil;
+    cell.status.image = nil;
+    cell.favorite.image = nil;
+    cell.shared.image = nil;
+    cell.local.image = nil;
     
     cell.labelTitle.enabled = YES;
     cell.labelTitle.text = @"";
@@ -5010,7 +5010,7 @@
         
         if (metadata.favorite) {
             
-            cell.offlineImageView.image = [UIImage imageNamed:@"favorite"];
+            cell.favorite.image = [UIImage imageNamed:@"favorite"];
         }
         
     } else {
@@ -5056,9 +5056,9 @@
     // assegnamo l'immagine anteprima se esiste, altrimenti metti quella standars
     if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID]]) {
         
-        cell.fileImageView.image = [app.icoImagesCache objectForKey:metadata.fileID];
+        cell.file.image = [app.icoImagesCache objectForKey:metadata.fileID];
         
-        if (cell.fileImageView.image == nil) {
+        if (cell.file.image == nil) {
             
             NSString *fileID = metadata.fileID;
             
@@ -5073,7 +5073,7 @@
                     CCCellMainTransfer *cell = [tableView cellForRowAtIndexPath:indexPath];
                     
                     if (cell)
-                        cell.fileImageView.image = image;
+                        cell.file.image = image;
                 });
             });
         }
@@ -5081,9 +5081,9 @@
     } else {
         
         if (metadata.directory)
-            cell.fileImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:metadata.iconName] color:[NCBrandColor sharedInstance].brand];
+            cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:metadata.iconName] color:[NCBrandColor sharedInstance].brand];
         else
-            cell.fileImageView.image = [UIImage imageNamed:metadata.iconName];
+            cell.file.image = [UIImage imageNamed:metadata.iconName];
         
         if (metadata.thumbnailExists)
             [[CCActions sharedInstance] downloadTumbnail:metadata delegate:self];
@@ -5096,7 +5096,7 @@
     // File Cyptated
     if (metadata.cryptated && metadata.directory == NO && [metadata.type isEqualToString: k_metadataType_template] == NO) {
      
-        cell.statusImageView.image = [UIImage imageNamed:@"lock"];
+        cell.status.image = [UIImage imageNamed:@"lock"];
     }
     
     // Directory con passcode lock attivato
@@ -5104,7 +5104,7 @@
     tableDirectory *directory = [[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"serverUrl = %@", lockServerUrl]];
     
     if (metadata.directory && (directory.lock && [[CCUtility getBlockCode] length]))
-        cell.statusImageView.image = [UIImage imageNamed:@"passcode"];
+        cell.status.image = [UIImage imageNamed:@"passcode"];
     
     // ----------------------------------------------------------------------------------------------------------
     // Favorite
@@ -5112,7 +5112,7 @@
     
     if (metadata.favorite) {
         
-        cell.offlineImageView.image = [UIImage imageNamed:@"favorite"];
+        cell.favorite.image = [UIImage imageNamed:@"favorite"];
     }
     
     // ----------------------------------------------------------------------------------------------------------
@@ -5131,17 +5131,17 @@
        
             if (metadata.directory) {
                 
-                cell.fileImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_shared_with_me"] color:[NCBrandColor sharedInstance].brand];
-                cell.sharedImageView.userInteractionEnabled = NO;
+                cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_shared_with_me"] color:[NCBrandColor sharedInstance].brand];
+                cell.shared.userInteractionEnabled = NO;
                 
             } else {
             
-                cell.sharedImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetShare"] color:[NCBrandColor sharedInstance].brand];
+                cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetShare"] color:[NCBrandColor sharedInstance].brand];
             
                 UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapActionConnectionMounted:)];
                 [tap setNumberOfTapsRequired:1];
-                cell.sharedImageView.userInteractionEnabled = YES;
-                [cell.sharedImageView addGestureRecognizer:tap];
+                cell.shared.userInteractionEnabled = YES;
+                [cell.shared addGestureRecognizer:tap];
             }
         }
         
@@ -5149,17 +5149,17 @@
             
             if (metadata.directory) {
                 
-                cell.fileImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_external"] color:[NCBrandColor sharedInstance].brand];
-                cell.sharedImageView.userInteractionEnabled = NO;
+                cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_external"] color:[NCBrandColor sharedInstance].brand];
+                cell.shared.userInteractionEnabled = NO;
                 
             } else {
                 
-                cell.sharedImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"shareMounted"] color:[NCBrandColor sharedInstance].brand];
+                cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"shareMounted"] color:[NCBrandColor sharedInstance].brand];
                 
                 UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapActionConnectionMounted:)];
                 [tap setNumberOfTapsRequired:1];
-                cell.sharedImageView.userInteractionEnabled = YES;
-                [cell.sharedImageView addGestureRecognizer:tap];
+                cell.shared.userInteractionEnabled = YES;
+                [cell.shared addGestureRecognizer:tap];
             }
         }
         
@@ -5168,29 +5168,29 @@
             if (metadata.directory) {
                 
                 if ([shareLink length] > 0)
-                    cell.fileImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_public"] color:[NCBrandColor sharedInstance].brand];
+                    cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_public"] color:[NCBrandColor sharedInstance].brand];
                 if ([shareUserAndGroup length] > 0)
-                    cell.fileImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_shared_with_me"] color:[NCBrandColor sharedInstance].brand];
+                    cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_shared_with_me"] color:[NCBrandColor sharedInstance].brand];
                 
-                cell.sharedImageView.userInteractionEnabled = NO;
+                cell.shared.userInteractionEnabled = NO;
                 
             } else {
                 
                 if ([shareLink length] > 0)
-                    cell.sharedImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"shareLink"] color:[NCBrandColor sharedInstance].brand];
+                    cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"shareLink"] color:[NCBrandColor sharedInstance].brand];
                 if ([shareUserAndGroup length] > 0)
-                    cell.sharedImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetShare"] color:[NCBrandColor sharedInstance].brand];
+                    cell.shared.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"actionSheetShare"] color:[NCBrandColor sharedInstance].brand];
                 
                 UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapActionShared:)];
                 [tap setNumberOfTapsRequired:1];
-                cell.sharedImageView.userInteractionEnabled = YES;
-                [cell.sharedImageView addGestureRecognizer:tap];
+                cell.shared.userInteractionEnabled = YES;
+                [cell.shared addGestureRecognizer:tap];
             }
         }
         
     } else {
         
-        cell.sharedImageView.userInteractionEnabled = NO;
+        cell.shared.userInteractionEnabled = NO;
     }
     
     // ----------------------------------------------------------------------------------------------------------
@@ -5199,8 +5199,8 @@
     
     if ([metadata.session length] > 0 && [metadata.session containsString:@"download"]) {
         
-        if (metadata.cryptated) cell.statusImageView.image = [UIImage imageNamed:@"statusdownloadcrypto"];
-        else cell.statusImageView.image = [UIImage imageNamed:@"statusdownload"];
+        if (metadata.cryptated) cell.status.image = [UIImage imageNamed:@"statusdownloadcrypto"];
+        else cell.status.image = [UIImage imageNamed:@"statusdownload"];
 
         // sessionTaskIdentifier : RELOAD + STOP
         if (metadata.sessionTaskIdentifier != k_taskIdentifierDone) {
@@ -5244,7 +5244,7 @@
         
         if (metadata.sessionTaskIdentifier == k_taskIdentifierError || metadata.sessionTaskIdentifierPlist == k_taskIdentifierError) {
             
-            cell.statusImageView.image = [UIImage imageNamed:@"statuserror"];
+            cell.status.image = [UIImage imageNamed:@"statuserror"];
             
             if ([metadata.sessionError length] == 0)
                 cell.labelInfoFile.text = [NSString stringWithFormat:@"%@, %@", NSLocalizedString(@"_error_",nil), NSLocalizedString(@"_file_not_downloaded_",nil)];
@@ -5259,8 +5259,8 @@
     
     if ([metadata.session length] > 0 && [metadata.session rangeOfString:@"upload"].location != NSNotFound) {
         
-        if (metadata.cryptated) cell.statusImageView.image = [UIImage imageNamed:@"statusuploadcrypto"];
-        else cell.statusImageView.image = [UIImage imageNamed:@"statusupload"];
+        if (metadata.cryptated) cell.status.image = [UIImage imageNamed:@"statusuploadcrypto"];
+        else cell.status.image = [UIImage imageNamed:@"statusupload"];
         
         if (metadata.cryptated)[cell.cancelTaskButton setBackgroundImage:[UIImage imageNamed:@"removetaskcrypto"] forState:UIControlStateNormal];
         else [cell.cancelTaskButton setBackgroundImage:[UIImage imageNamed:@"removetask"] forState:UIControlStateNormal];
@@ -5271,8 +5271,8 @@
             if (metadata.cryptated)[cell.reloadTaskButton setBackgroundImage:[UIImage imageNamed:@"reloadtaskcrypto"] forState:UIControlStateNormal];
             else [cell.reloadTaskButton setBackgroundImage:[UIImage imageNamed:@"reloadtask"] forState:UIControlStateNormal];
             
-            if (metadata.cryptated) cell.statusImageView.image = [UIImage imageNamed:@"statusstopcrypto"];
-            else cell.statusImageView.image = [UIImage imageNamed:@"statusstop"];
+            if (metadata.cryptated) cell.status.image = [UIImage imageNamed:@"statusstopcrypto"];
+            else cell.status.image = [UIImage imageNamed:@"statusstop"];
             
             cell.reloadTaskButton.hidden = NO;
             cell.stopTaskButton.hidden = YES;
@@ -5288,7 +5288,7 @@
         
         // se non c'è una preview in bianconero metti l'immagine di default
         if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@.ico", app.directoryUser, metadata.fileID]] == NO)
-            cell.fileImageView.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"uploaddisable"] color:[NCBrandColor sharedInstance].brand];
+            cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"uploaddisable"] color:[NCBrandColor sharedInstance].brand];
         
         cell.labelTitle.enabled = NO;
         cell.labelInfoFile.text = [NSString stringWithFormat:@"%@", lunghezzaFile];
@@ -5310,7 +5310,7 @@
         if (metadata.sessionTaskIdentifier == k_taskIdentifierError || metadata.sessionTaskIdentifierPlist == k_taskIdentifierError) {
         
             cell.labelTitle.enabled = NO;
-            cell.statusImageView.image = [UIImage imageNamed:@"statuserror"];
+            cell.status.image = [UIImage imageNamed:@"statuserror"];
         
             if ([metadata.sessionError length] == 0)
                 cell.labelInfoFile.text = [NSString stringWithFormat:@"%@, %@", NSLocalizedString(@"_error_",nil), NSLocalizedString(@"_file_not_uploaded_",nil)];
@@ -5493,50 +5493,6 @@
     [self setTitle];
 }
 
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark ===== Synchronize Folder Cell =====
-#pragma --------------------------------------------------------------------------------------------
-
-- (void)synchronizeFolderGraphicsServerUrl:(NSString *)serverUrl animation:(BOOL)animation
-{
-    BOOL cryptated = NO;
-    CCCellMain *cell;
-    
-    for (NSString* fileID in _sectionDataSource.allRecordsDataSource) {
-        
-        tableMetadata *recordMetadata = [_sectionDataSource.allRecordsDataSource objectForKey:fileID];
-        
-        if (recordMetadata.directory == NO)
-            continue;
-        
-        if ([[CCUtility stringAppendServerUrl:_serverUrl addFileName:recordMetadata.fileNameData] isEqualToString:serverUrl]) {
-            
-            NSIndexPath *indexPath = [_sectionDataSource.fileIDIndexPath objectForKey:recordMetadata.fileID];
-            cell = (CCCellMain *)[self.tableView cellForRowAtIndexPath:indexPath];
-            cryptated = recordMetadata.cryptated;
-                
-            break;
-        }
-    }
-
-    if (!cell)
-        return;
-    
-    if (animation) {
-        
-        NSURL *myURL;
-        
-        if (cryptated)
-            myURL = [[NSBundle mainBundle] URLForResource: @"synchronizedcrypto" withExtension:@"gif"];
-        else
-            myURL = [[NSBundle mainBundle] URLForResource: @"synchronized" withExtension:@"gif"];        
-        
-    } else {
-        
-        cell.synchronizedImageView.image = nil;
-    }
-}
-
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ===== Navigation ====
 #pragma --------------------------------------------------------------------------------------------