Browse Source

Improvements

Marino Faggiana 1 year ago
parent
commit
81234c6e16

+ 1 - 1
iOSClient/Data/NCManageDatabase+Metadata.swift

@@ -874,7 +874,7 @@ extension NCManageDatabase {
 
     func getMetadataFromOcId(_ ocId: String?) -> tableMetadata? {
 
-        guard let ocId = ocId else { return nil }
+        guard let ocId else { return nil }
         do {
             let realm = try Realm()
             guard let result = realm.objects(tableMetadata.self).filter("ocId == %@", ocId).first else { return nil }

+ 1 - 1
iOSClient/Main/Section Header Footer/NCSectionHeaderMenu.swift

@@ -198,7 +198,7 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
             viewTransferHeightConstraint.constant = 0
         } else {
             var image: UIImage?
-            if let ocId = ocId,
+            if let ocId,
                let metadata = NCManageDatabase.shared.getMetadataFromOcId(ocId) {
                 image = NCUtility.shared.createFilePreviewImage(ocId: metadata.ocId, etag: metadata.etag, fileNameView: metadata.fileNameView, classFile: metadata.classFile, status: metadata.status, createPreviewMedia: true)?.darken()
                 if image == nil {

+ 6 - 6
iOSClient/Main/Section Header Footer/NCSectionHeaderMenu.xib

@@ -100,7 +100,7 @@
                             </constraints>
                         </view>
                         <button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aS9-DV-CXI">
-                            <rect key="frame" x="10" y="10" width="30" height="30"/>
+                            <rect key="frame" x="10" y="8" width="30" height="30"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="30" id="AkI-Uq-9rJ"/>
                                 <constraint firstAttribute="width" constant="30" id="S1K-Qo-eU9"/>
@@ -110,14 +110,14 @@
                             </connections>
                         </button>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="stop.circle" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="Pgk-le-540">
-                            <rect key="frame" x="15" y="15.5" width="20" height="19"/>
+                            <rect key="frame" x="15" y="13.5" width="20" height="19"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="20" id="3SW-CS-jiT"/>
                                 <constraint firstAttribute="height" constant="20" id="xVb-tv-en7"/>
                             </constraints>
                         </imageView>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="text" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eER-Zj-8iK">
-                            <rect key="frame" x="50" y="16" width="514" height="18"/>
+                            <rect key="frame" x="50" y="14" width="514" height="18"/>
                             <fontDescription key="fontDescription" type="system" pointSize="15"/>
                             <nil key="textColor"/>
                             <nil key="highlightedColor"/>
@@ -129,14 +129,14 @@
                     <constraints>
                         <constraint firstItem="Pgk-le-540" firstAttribute="centerX" secondItem="aS9-DV-CXI" secondAttribute="centerX" id="3fo-qC-duA"/>
                         <constraint firstAttribute="trailing" secondItem="FOe-YO-km8" secondAttribute="trailing" constant="-1" id="3gk-sW-WeV"/>
-                        <constraint firstItem="Pgk-le-540" firstAttribute="centerY" secondItem="I6b-6a-TKg" secondAttribute="centerY" id="3hl-za-XZ9"/>
                         <constraint firstAttribute="bottom" secondItem="McE-3D-mc5" secondAttribute="bottom" id="697-ky-07J"/>
                         <constraint firstAttribute="height" constant="50" id="86k-97-oGl"/>
+                        <constraint firstItem="Pgk-le-540" firstAttribute="centerY" secondItem="aS9-DV-CXI" secondAttribute="centerY" id="9Lm-Ql-nt0"/>
                         <constraint firstAttribute="bottom" secondItem="FOe-YO-km8" secondAttribute="bottom" id="ESd-Gt-Xcc"/>
-                        <constraint firstItem="aS9-DV-CXI" firstAttribute="centerY" secondItem="I6b-6a-TKg" secondAttribute="centerY" id="Mli-mT-whp"/>
+                        <constraint firstItem="eER-Zj-8iK" firstAttribute="centerY" secondItem="aS9-DV-CXI" secondAttribute="centerY" id="Ko8-gC-6Zd"/>
+                        <constraint firstItem="aS9-DV-CXI" firstAttribute="centerY" secondItem="I6b-6a-TKg" secondAttribute="centerY" constant="-2" id="Mli-mT-whp"/>
                         <constraint firstAttribute="trailing" secondItem="eER-Zj-8iK" secondAttribute="trailing" constant="10" id="QyZ-Z4-0tw"/>
                         <constraint firstItem="McE-3D-mc5" firstAttribute="leading" secondItem="I6b-6a-TKg" secondAttribute="leading" id="TRt-jh-ZEo"/>
-                        <constraint firstItem="eER-Zj-8iK" firstAttribute="centerY" secondItem="I6b-6a-TKg" secondAttribute="centerY" id="cse-7W-4ay"/>
                         <constraint firstAttribute="trailing" secondItem="McE-3D-mc5" secondAttribute="trailing" id="fjz-bk-gcP"/>
                         <constraint firstItem="eER-Zj-8iK" firstAttribute="leading" secondItem="aS9-DV-CXI" secondAttribute="trailing" constant="10" id="idn-9t-2Ap"/>
                         <constraint firstItem="aS9-DV-CXI" firstAttribute="leading" secondItem="I6b-6a-TKg" secondAttribute="leading" constant="10" id="jIP-Fr-dnx"/>