Browse Source

improvements view offline/Trash

marinofaggiana 5 years ago
parent
commit
9bbabcace6

+ 0 - 39
iOSClient/Main/Cell/NCGridCell.swift

@@ -34,11 +34,6 @@ class NCGridCell: UICollectionViewCell {
     @IBOutlet weak var imageLocal: UIImageView!
 
     @IBOutlet weak var labelTitle: UILabel!
-    @IBOutlet weak var labelTitleTrailing: NSLayoutConstraint!
-
-    @IBOutlet weak var imageShare: UIImageView!
-    @IBOutlet weak var imageShareTrailing: NSLayoutConstraint!
-
     @IBOutlet weak var buttonMore: UIButton!
 
     var delegate: NCGridCellDelegate?
@@ -60,40 +55,6 @@ class NCGridCell: UICollectionViewCell {
     @IBAction func touchUpInsideMore(_ sender: Any) {
         delegate?.tapMoreGridItem(with: objectId, sender: sender)
     }
-    
-    func hide(buttonMore: Bool, hideImageShare: Bool) {
-        
-        if buttonMore && hideImageShare {
-            
-            self.buttonMore.isHidden = true
-            self.imageShare.isHidden = true
-            
-            labelTitleTrailing.constant = 0
-            
-        } else if buttonMore && !hideImageShare {
-            
-            self.buttonMore.isHidden = true
-            self.imageShare.isHidden = false
-            
-            imageShareTrailing.constant = 0
-            labelTitleTrailing.constant = imageShareWidth
-            
-        } else if !buttonMore && hideImageShare {
-            
-            self.buttonMore.isHidden = false
-            self.imageShare.isHidden = true
-            
-            labelTitleTrailing.constant = buttonMoreWidth
-            
-        } else if !buttonMore && !hideImageShare {
-            
-            self.buttonMore.isHidden = false
-            self.imageShare.isHidden = false
-            
-            imageShareTrailing.constant = imageShareTrailingConstant
-            labelTitleTrailing.constant = labelTitleTrailingConstant
-        }
-    }
 }
 
 protocol NCGridCellDelegate {

+ 4 - 16
iOSClient/Main/Cell/NCGridCell.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -23,7 +23,7 @@
                         <rect key="frame" x="0.0" y="0.0" width="220" height="220"/>
                     </imageView>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eU3-lY-fKr" userLabel="labelTitle">
-                        <rect key="frame" x="0.0" y="230" width="170" height="15"/>
+                        <rect key="frame" x="0.0" y="230" width="185" height="15"/>
                         <fontDescription key="fontDescription" type="system" pointSize="12"/>
                         <nil key="textColor"/>
                         <nil key="highlightedColor"/>
@@ -67,21 +67,12 @@
                             <constraint firstAttribute="width" constant="15" id="xLe-lb-N1p"/>
                         </constraints>
                     </imageView>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="nZn-9M-s4G" userLabel="imageShare">
-                        <rect key="frame" x="170" y="225" width="25" height="25"/>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="25" id="cug-BZ-vli"/>
-                            <constraint firstAttribute="height" constant="25" id="whK-zg-83S"/>
-                        </constraints>
-                    </imageView>
                 </subviews>
             </view>
             <constraints>
                 <constraint firstItem="DHy-Up-3Bh" firstAttribute="leading" secondItem="VXh-sQ-LeX" secondAttribute="leading" constant="5" id="1T3-8p-uIW"/>
                 <constraint firstItem="AYs-f2-vve" firstAttribute="leading" secondItem="5Ci-V1-hf5" secondAttribute="trailing" constant="-20" id="3e3-0A-NSl"/>
                 <constraint firstItem="eU3-lY-fKr" firstAttribute="top" secondItem="5Ci-V1-hf5" secondAttribute="bottom" constant="10" id="4Yq-Nh-z1l"/>
-                <constraint firstItem="VXh-sQ-LeX" firstAttribute="trailing" secondItem="eU3-lY-fKr" secondAttribute="trailing" constant="50" id="5SO-rO-DnZ"/>
-                <constraint firstItem="VXh-sQ-LeX" firstAttribute="trailing" secondItem="nZn-9M-s4G" secondAttribute="trailing" constant="25" id="645-Kw-aJh"/>
                 <constraint firstItem="EJs-Ro-nbe" firstAttribute="top" secondItem="5Ci-V1-hf5" secondAttribute="bottom" constant="5" id="89Q-77-ulE"/>
                 <constraint firstItem="DHy-Up-3Bh" firstAttribute="top" secondItem="VXh-sQ-LeX" secondAttribute="top" constant="5" id="ESV-qE-tbO"/>
                 <constraint firstItem="5Ci-V1-hf5" firstAttribute="top" secondItem="VXh-sQ-LeX" secondAttribute="top" id="Ouj-ZD-UFm"/>
@@ -90,8 +81,8 @@
                 <constraint firstItem="81G-wH-fjN" firstAttribute="top" secondItem="5Ci-V1-hf5" secondAttribute="bottom" constant="-20" id="aEb-vq-8sk"/>
                 <constraint firstItem="VXh-sQ-LeX" firstAttribute="trailing" secondItem="5Ci-V1-hf5" secondAttribute="trailing" id="cHT-cP-NN6"/>
                 <constraint firstItem="VXh-sQ-LeX" firstAttribute="bottom" secondItem="5Ci-V1-hf5" secondAttribute="bottom" constant="45" id="eEC-eB-alE"/>
-                <constraint firstItem="nZn-9M-s4G" firstAttribute="top" secondItem="5Ci-V1-hf5" secondAttribute="bottom" constant="5" id="fIY-O8-dnI"/>
                 <constraint firstItem="eU3-lY-fKr" firstAttribute="leading" secondItem="VXh-sQ-LeX" secondAttribute="leading" id="gZe-FC-8XQ"/>
+                <constraint firstItem="EJs-Ro-nbe" firstAttribute="leading" secondItem="eU3-lY-fKr" secondAttribute="trailing" constant="10" id="mhP-9c-PC9"/>
                 <constraint firstItem="81G-wH-fjN" firstAttribute="leading" secondItem="5Ci-V1-hf5" secondAttribute="trailing" constant="-20" id="nFH-Pc-end"/>
                 <constraint firstItem="5Ci-V1-hf5" firstAttribute="leading" secondItem="VXh-sQ-LeX" secondAttribute="leading" id="qT3-WD-iTV"/>
                 <constraint firstItem="5Ci-V1-hf5" firstAttribute="top" secondItem="AYs-f2-vve" secondAttribute="bottom" constant="-20" id="rLL-6g-ypv"/>
@@ -105,11 +96,8 @@
                 <outlet property="imageItem" destination="5Ci-V1-hf5" id="xky-Nw-NUb"/>
                 <outlet property="imageLocal" destination="81G-wH-fjN" id="bqj-wQ-CBV"/>
                 <outlet property="imageSelect" destination="DHy-Up-3Bh" id="mo9-rP-P4I"/>
-                <outlet property="imageShare" destination="nZn-9M-s4G" id="F94-RD-QXu"/>
-                <outlet property="imageShareTrailing" destination="645-Kw-aJh" id="aRF-kg-ujJ"/>
                 <outlet property="imageStatus" destination="a0p-rj-jnV" id="6Dg-tf-evd"/>
                 <outlet property="labelTitle" destination="eU3-lY-fKr" id="0P7-yM-Asb"/>
-                <outlet property="labelTitleTrailing" destination="5SO-rO-DnZ" id="peA-RW-j2u"/>
             </connections>
             <point key="canvasLocation" x="88" y="141.67916041979012"/>
         </collectionViewCell>

+ 5 - 40
iOSClient/Main/Cell/NCListCell.swift

@@ -35,12 +35,10 @@ class NCListCell: UICollectionViewCell {
     @IBOutlet weak var imageLocal: UIImageView!
 
     @IBOutlet weak var labelTitle: UILabel!
-    @IBOutlet weak var labelTitleTrailing: NSLayoutConstraint!
 
     @IBOutlet weak var labelInfo: UILabel!
 
     @IBOutlet weak var imageShare: UIImageView!
-    @IBOutlet weak var imageShareTrailing: NSLayoutConstraint!
 
     @IBOutlet weak var imageMore: UIImageView!
     @IBOutlet weak var buttonMore: UIButton!
@@ -65,49 +63,16 @@ class NCListCell: UICollectionViewCell {
         separator.backgroundColor = NCBrandColor.sharedInstance.seperator
     }
     
-    @IBAction func touchUpInsideMore(_ sender: Any) {
-        delegate?.tapMoreListItem(with: objectId, sender: sender)
+    @IBAction func touchUpInsideShare(_ sender: Any) {
+        delegate?.tapShareListItem(with: objectId, sender: sender)
     }
     
-    func hide(buttonMore: Bool, hideImageShare: Bool) {
-        
-        if buttonMore && hideImageShare {
-            
-            self.buttonMore.isHidden = true
-            self.imageMore.isHidden = true
-            self.imageShare.isHidden = true
-            
-            labelTitleTrailing.constant = 0
-            
-        } else if buttonMore && !hideImageShare {
-            
-            self.buttonMore.isHidden = true
-            self.imageMore.isHidden = true
-            self.imageShare.isHidden = false
-            
-            imageShareTrailing.constant = 5
-            labelTitleTrailing.constant = imageShareWidth + imageShareTrailing.constant
-            
-        } else if !buttonMore && hideImageShare {
-            
-            self.buttonMore.isHidden = false
-            self.imageMore.isHidden = false
-            self.imageShare.isHidden = true
-
-            labelTitleTrailing.constant = buttonMoreWidth
-            
-        } else if !buttonMore && !hideImageShare {
-            
-            self.buttonMore.isHidden = false
-            self.imageMore.isHidden = false
-            self.imageShare.isHidden = false
-            
-            imageShareTrailing.constant = imageShareTrailingConstant
-            labelTitleTrailing.constant = labelTitleTrailingConstant
-        }
+    @IBAction func touchUpInsideMore(_ sender: Any) {
+        delegate?.tapMoreListItem(with: objectId, sender: sender)
     }
 }
 
 protocol NCListCellDelegate {
+    func tapShareListItem(with objectId: String, sender: Any)
     func tapMoreListItem(with objectId: String, sender: Any)
 }

+ 35 - 25
iOSClient/Main/Cell/NCListCell.xib

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -41,24 +41,17 @@
                         </constraints>
                     </imageView>
                     <label opaque="NO" userInteractionEnabled="NO" tag="101" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UtT-L6-mgW" userLabel="labelTitle">
-                        <rect key="frame" x="95" y="13" width="430" height="18"/>
+                        <rect key="frame" x="95" y="13" width="420" height="18"/>
                         <fontDescription key="fontDescription" type="system" pointSize="15"/>
                         <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
                     <label opaque="NO" userInteractionEnabled="NO" tag="102" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AXX-71-9Q6" userLabel="labelInfo">
-                        <rect key="frame" x="95" y="31" width="430" height="15"/>
+                        <rect key="frame" x="95" y="31" width="420" height="15"/>
                         <fontDescription key="fontDescription" type="system" pointSize="12"/>
                         <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                         <nil key="highlightedColor"/>
                     </label>
-                    <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dgL-g5-Nkc" userLabel="imageMore">
-                        <rect key="frame" x="565" y="20" width="20" height="20"/>
-                        <constraints>
-                            <constraint firstAttribute="width" constant="20" id="05P-NL-pd8"/>
-                            <constraint firstAttribute="height" constant="20" id="Jet-eo-x1M" userLabel="height = 20"/>
-                        </constraints>
-                    </imageView>
                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yhy-xd-w5C" userLabel="buttonMore">
                         <rect key="frame" x="560" y="0.0" width="40" height="60"/>
                         <constraints>
@@ -69,14 +62,16 @@
                             <action selector="touchUpInsideMore:" destination="jxV-Pk-fPt" eventType="touchUpInside" id="Mtu-LP-kuR"/>
                         </connections>
                     </button>
-                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Egg-cb-EhZ" userLabel="separator">
-                        <rect key="frame" x="85" y="59" width="515" height="1"/>
-                        <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="o4u-0K-Qpt" userLabel="buttonShare">
+                        <rect key="frame" x="520" y="0.0" width="40" height="60"/>
                         <constraints>
-                            <constraint firstAttribute="height" constant="1" id="G5S-67-boG"/>
+                            <constraint firstAttribute="height" constant="60" id="WOg-y5-5UA"/>
+                            <constraint firstAttribute="width" constant="40" id="YSF-9Z-XlJ"/>
                         </constraints>
-                    </view>
+                        <connections>
+                            <action selector="touchUpInsideShare:" destination="jxV-Pk-fPt" eventType="touchUpInside" id="UVA-XS-fRf"/>
+                        </connections>
+                    </button>
                     <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="AyA-hP-r6w" userLabel="imageSelect">
                         <rect key="frame" x="10" y="17.5" width="25" height="25"/>
                         <constraints>
@@ -91,37 +86,54 @@
                             <constraint firstAttribute="height" constant="15" id="N8h-3R-JpE"/>
                         </constraints>
                     </imageView>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dgL-g5-Nkc" userLabel="imageMore">
+                        <rect key="frame" x="565" y="20" width="20" height="20"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="20" id="05P-NL-pd8"/>
+                            <constraint firstAttribute="height" constant="20" id="Jet-eo-x1M" userLabel="height = 20"/>
+                        </constraints>
+                    </imageView>
                     <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jc6-Vg-TaS" userLabel="imageShare">
-                        <rect key="frame" x="530" y="17.5" width="25" height="25"/>
+                        <rect key="frame" x="530" y="20" width="20" height="20"/>
                         <constraints>
-                            <constraint firstAttribute="height" constant="25" id="Cvy-nZ-zyD"/>
-                            <constraint firstAttribute="width" constant="25" id="jfe-Fg-vA8"/>
+                            <constraint firstAttribute="height" constant="20" id="Cvy-nZ-zyD"/>
+                            <constraint firstAttribute="width" constant="20" id="jfe-Fg-vA8"/>
                         </constraints>
                     </imageView>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Egg-cb-EhZ" userLabel="separator">
+                        <rect key="frame" x="85" y="59" width="515" height="1"/>
+                        <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="1" id="G5S-67-boG"/>
+                        </constraints>
+                    </view>
                 </subviews>
             </view>
             <constraints>
-                <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="jc6-Vg-TaS" secondAttribute="trailing" constant="45" id="4YU-yn-33L"/>
+                <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="jc6-Vg-TaS" secondAttribute="trailing" constant="50" id="4YU-yn-33L"/>
                 <constraint firstItem="H4E-G2-C1H" firstAttribute="leading" secondItem="w2m-Vw-hpd" secondAttribute="trailing" constant="-10" id="6fN-Jc-WID"/>
                 <constraint firstItem="Gu8-oz-zWa" firstAttribute="bottom" secondItem="Egg-cb-EhZ" secondAttribute="bottom" id="81D-sw-EaX"/>
                 <constraint firstItem="yhy-xd-w5C" firstAttribute="leading" secondItem="dgL-g5-Nkc" secondAttribute="trailing" constant="-25" id="980-6s-ave"/>
                 <constraint firstItem="w2m-Vw-hpd" firstAttribute="top" secondItem="C4K-Nv-phA" secondAttribute="bottom" constant="-10" id="DB1-jf-rpE"/>
+                <constraint firstItem="o4u-0K-Qpt" firstAttribute="centerY" secondItem="Gu8-oz-zWa" secondAttribute="centerY" id="HFM-sM-wJr"/>
                 <constraint firstItem="Egg-cb-EhZ" firstAttribute="leading" secondItem="w2m-Vw-hpd" secondAttribute="trailing" id="JCm-UU-Pxu"/>
                 <constraint firstItem="dgL-g5-Nkc" firstAttribute="centerY" secondItem="yhy-xd-w5C" secondAttribute="centerY" id="OMy-Cu-HAx"/>
                 <constraint firstItem="UtT-L6-mgW" firstAttribute="leading" secondItem="w2m-Vw-hpd" secondAttribute="trailing" constant="10" id="PQ8-0b-fLa"/>
                 <constraint firstItem="AXX-71-9Q6" firstAttribute="leading" secondItem="w2m-Vw-hpd" secondAttribute="trailing" constant="10" id="Qvq-r5-AX9"/>
                 <constraint firstItem="AyA-hP-r6w" firstAttribute="leading" secondItem="Gu8-oz-zWa" secondAttribute="leading" constant="10" id="RYl-cO-cCN"/>
                 <constraint firstItem="C4K-Nv-phA" firstAttribute="leading" secondItem="w2m-Vw-hpd" secondAttribute="trailing" constant="-10" id="Sof-wy-toF"/>
-                <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="UtT-L6-mgW" secondAttribute="trailing" constant="75" id="Tq4-bB-YMV"/>
+                <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="UtT-L6-mgW" secondAttribute="trailing" constant="85" id="Tq4-bB-YMV"/>
                 <constraint firstItem="H4E-G2-C1H" firstAttribute="top" secondItem="w2m-Vw-hpd" secondAttribute="bottom" constant="-10" id="UWI-r9-vcA"/>
                 <constraint firstItem="7Q9-Tv-9yo" firstAttribute="top" secondItem="w2m-Vw-hpd" secondAttribute="bottom" constant="-10" id="XbB-4a-WpA"/>
                 <constraint firstItem="yhy-xd-w5C" firstAttribute="centerY" secondItem="Gu8-oz-zWa" secondAttribute="centerY" id="ZO7-Ny-L3I"/>
+                <constraint firstItem="yhy-xd-w5C" firstAttribute="leading" secondItem="o4u-0K-Qpt" secondAttribute="trailing" id="b6M-di-61w"/>
                 <constraint firstItem="Gu8-oz-zWa" firstAttribute="bottom" secondItem="AXX-71-9Q6" secondAttribute="bottom" constant="14" id="d06-sn-I3Y"/>
                 <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="Egg-cb-EhZ" secondAttribute="trailing" id="k8f-bU-D6I"/>
                 <constraint firstItem="w2m-Vw-hpd" firstAttribute="leading" secondItem="Gu8-oz-zWa" secondAttribute="leading" constant="45" id="mBb-ff-7HD"/>
                 <constraint firstItem="w2m-Vw-hpd" firstAttribute="leading" secondItem="7Q9-Tv-9yo" secondAttribute="trailing" constant="-10" id="mon-aq-gcP"/>
                 <constraint firstItem="UtT-L6-mgW" firstAttribute="top" secondItem="Gu8-oz-zWa" secondAttribute="top" constant="13" id="nrY-2F-QZ2"/>
-                <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="AXX-71-9Q6" secondAttribute="trailing" constant="75" id="p0M-zU-aDG"/>
+                <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="AXX-71-9Q6" secondAttribute="trailing" constant="85" id="p0M-zU-aDG"/>
                 <constraint firstItem="w2m-Vw-hpd" firstAttribute="centerY" secondItem="Gu8-oz-zWa" secondAttribute="centerY" id="qKl-4Y-m5t"/>
                 <constraint firstItem="Gu8-oz-zWa" firstAttribute="trailing" secondItem="yhy-xd-w5C" secondAttribute="trailing" id="s2S-RP-cw5"/>
                 <constraint firstItem="AyA-hP-r6w" firstAttribute="centerY" secondItem="Gu8-oz-zWa" secondAttribute="centerY" id="sJp-0x-bdC"/>
@@ -138,11 +150,9 @@
                 <outlet property="imageMore" destination="dgL-g5-Nkc" id="r7x-Ib-4nz"/>
                 <outlet property="imageSelect" destination="AyA-hP-r6w" id="c1t-yz-HBg"/>
                 <outlet property="imageShare" destination="jc6-Vg-TaS" id="uca-x2-wak"/>
-                <outlet property="imageShareTrailing" destination="p0M-zU-aDG" id="O55-nu-gbB"/>
                 <outlet property="imageStatus" destination="7Q9-Tv-9yo" id="Qug-Q7-rRZ"/>
                 <outlet property="labelInfo" destination="AXX-71-9Q6" id="krb-tZ-UQ7"/>
                 <outlet property="labelTitle" destination="UtT-L6-mgW" id="Xv6-zM-2v1"/>
-                <outlet property="labelTitleTrailing" destination="Tq4-bB-YMV" id="uMJ-4w-tx5"/>
                 <outlet property="separator" destination="Egg-cb-EhZ" id="uhq-Nc-z8K"/>
             </connections>
             <point key="canvasLocation" x="97.599999999999994" y="129.53523238380811"/>

+ 0 - 22
iOSClient/Main/NCMainCommon.swift

@@ -269,7 +269,6 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
             cell.imageLocal.image = nil
             cell.imageFavorite.image = nil
             cell.imageShare.image = nil
-            cell.hide(buttonMore: hideButtonMore, hideImageShare: true)
             
             if metadata.directory {
                 
@@ -320,16 +319,12 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
                 // Share
                 if (isShare) {
                     cell.imageShare.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "share"), width: 50, height: 50, color: NCBrandColor.sharedInstance.optionItem)
-                    cell.hide(buttonMore: hideButtonMore, hideImageShare: false)
                 } else if (isMounted) {
                     cell.imageShare.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "shareMounted"), width: 50, height: 50, color: NCBrandColor.sharedInstance.optionItem)
-                    cell.hide(buttonMore: hideButtonMore, hideImageShare: false)
                 } else if (tableShare != nil && tableShare!.shareType == Int(shareTypeLink.rawValue)) {
                     cell.imageShare.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "sharebylink"), width: 50, height: 50, color: NCBrandColor.sharedInstance.optionItem)
-                    cell.hide(buttonMore: hideButtonMore, hideImageShare: false)
                 } else if (tableShare != nil && tableShare!.shareType != Int(shareTypeLink.rawValue)) {
                     cell.imageShare.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "share"), width: 50, height: 50, color: NCBrandColor.sharedInstance.optionItem)
-                    cell.hide(buttonMore: hideButtonMore, hideImageShare: false)
                 }
             }
             
@@ -374,8 +369,6 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
             cell.imageStatus.image = nil
             cell.imageLocal.image = nil
             cell.imageFavorite.image = nil
-            cell.imageShare.image = nil
-            cell.hide(buttonMore: hideButtonMore, hideImageShare: true)
             
             if metadata.directory {
                 
@@ -424,21 +417,6 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
                     if tableLocalFile!.offline { cell.imageLocal.image = UIImage.init(named: "offlineFlag") }
                     else { cell.imageLocal.image = UIImage.init(named: "local") }
                 }
-                
-                // Share
-                if (isShare) {
-                    cell.imageShare.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "share"), width: 50, height: 50, color: NCBrandColor.sharedInstance.optionItem)
-                    cell.hide(buttonMore: hideButtonMore, hideImageShare: false)
-                } else if (isMounted) {
-                    cell.imageShare.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "shareMounted"), width: 50, height: 50, color: NCBrandColor.sharedInstance.optionItem)
-                    cell.hide(buttonMore: hideButtonMore, hideImageShare: false)
-                } else if (tableShare != nil && tableShare!.shareType == Int(shareTypeLink.rawValue)) {
-                    cell.imageShare.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "sharebylink"), width: 50, height: 50, color: NCBrandColor.sharedInstance.optionItem)
-                    cell.hide(buttonMore: hideButtonMore, hideImageShare: false)
-                } else if (tableShare != nil && tableShare!.shareType != Int(shareTypeLink.rawValue)) {
-                    cell.imageShare.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "share"), width: 50, height: 50, color: NCBrandColor.sharedInstance.optionItem)
-                    cell.hide(buttonMore: hideButtonMore, hideImageShare: false)
-                }
             }
             
             // image Favorite

+ 9 - 0
iOSClient/Offline/NCOffline.swift

@@ -306,6 +306,15 @@ class NCOffline: UIViewController, UIGestureRecognizerDelegate, NCListCellDelega
         tapMoreGridItem(with: objectId, sender: sender)
     }
     
+    func tapShareListItem(with objectId: String, sender: Any) {
+        
+        guard let metadata = NCManageDatabase.sharedInstance.getMetadata(predicate: NSPredicate(format: "ocId == %@", objectId)) else {
+            return
+        }
+        
+        NCMainCommon.sharedInstance.openShare(ViewController: self, metadata: metadata, indexPage: 2)
+    }
+    
     func tapMoreGridItem(with objectId: String, sender: Any) {
         
         guard let metadata = NCManageDatabase.sharedInstance.getMetadata(predicate: NSPredicate(format: "ocId == %@", objectId)) else {

+ 3 - 1
iOSClient/Select/NCSelect.swift

@@ -386,7 +386,6 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
     }
     
     func tapMoreHeader(sender: Any) {
-        
     }
     
     func tapMoreListItem(with objectId: String, sender: Any) {
@@ -395,6 +394,9 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
     func tapMoreGridItem(with objectId: String, sender: Any) {
     }
     
+    func tapShareListItem(with objectId: String, sender: Any) {
+    }
+    
     // MARK: DROP-DOWN-MENU
     
     func dropdownMenu(_ dropdownMenu: DropdownMenu, didSelectRowAt indexPath: IndexPath) {

+ 2 - 2
iOSClient/Trash/NCTrash.swift

@@ -304,8 +304,8 @@ class NCTrash: UIViewController, UIGestureRecognizerDelegate, NCTrashListCellDel
             let appearanceDelete = ActionSheetItemAppearance.init()
             appearanceDelete.textColor = UIColor.red
             
-            items.append(ActionSheetItem(title: NSLocalizedString("_restore_", comment: ""), value: 0, image: CCGraphics.changeThemingColorImage(UIImage.init(named: "restore"), multiplier: 1, color: NCBrandColor.sharedInstance.icon)))
-            let itemDelete = ActionSheetItem(title: NSLocalizedString("_delete_", comment: ""), value: 1, image: CCGraphics.changeThemingColorImage(UIImage.init(named: "trash"), multiplier: 2, color: UIColor.red))
+            items.append(ActionSheetItem(title: NSLocalizedString("_restore_", comment: ""), value: 0, image: CCGraphics.changeThemingColorImage(UIImage.init(named: "restore"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)))
+            let itemDelete = ActionSheetItem(title: NSLocalizedString("_delete_", comment: ""), value: 1, image: CCGraphics.changeThemingColorImage(UIImage.init(named: "trash"), width: 50, height: 50, color: UIColor.red))
             itemDelete.customAppearance = appearanceDelete
             items.append(itemDelete)
             items.append(ActionSheetCancelButton(title: NSLocalizedString("_cancel_", comment: "")))