Эх сурвалжийг харах

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 жил өмнө
parent
commit
6ad63709ba

+ 0 - 23
iOSClient/Images.xcassets/plus-circle.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "plus-circle.png",
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "filename" : "plus-circle-1.png",
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "filename" : "plus-circle-2.png",
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}

BIN
iOSClient/Images.xcassets/plus-circle.imageset/plus-circle-1.png


BIN
iOSClient/Images.xcassets/plus-circle.imageset/plus-circle-2.png


BIN
iOSClient/Images.xcassets/plus-circle.imageset/plus-circle.png


+ 31 - 28
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -54,8 +54,9 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
     internal var listLayout: NCListLayout!
     internal var gridLayout: NCGridLayout!
 
-    let headerCommands: CGFloat = 50 + 40 + 10 // (50 Layout + 40 Button + 10 space)
-    let headerSection: CGFloat = 50
+    let heightButtonsOne: CGFloat = 60
+    let heightButtonsTwo: CGFloat = 40
+    let heightSection: CGFloat = 50
 
     private let footerHeight: CGFloat = 0
     private let footerEndHeight: CGFloat = 100
@@ -122,7 +123,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         }
 
         // Empty
-        emptyDataSet = NCEmptyDataSet(view: collectionView, offset: headerCommands, delegate: self)
+        emptyDataSet = NCEmptyDataSet(view: collectionView, offset: heightButtonsOne + heightButtonsTwo, delegate: self)
 
         // Long Press on CollectionView
         let longPressedGesture = UILongPressGestureRecognizer(target: self, action: #selector(longPressCollecationView(_:)))
@@ -680,28 +681,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         return userAlias
     }
 
-    func getHeaderHeight(section:Int) -> (heightHeaderCommands: CGFloat, heightHeaderRichWorkspace: CGFloat, heightHeaderSection: CGFloat) {
-
-        var headerRichWorkspace: CGFloat = 0
-
-        if let richWorkspaceText = richWorkspaceText {
-            let trimmed = richWorkspaceText.trimmingCharacters(in: .whitespaces)
-            if trimmed.count > 0 && !isSearching {
-                headerRichWorkspace = UIScreen.main.bounds.size.height / 6
-            }
-        }
-
-        if section == 0 && dataSource.numberOfSections() > 1 {
-            return (headerCommands, headerRichWorkspace, headerSection)
-        } else if section == 0 && dataSource.numberOfSections() == 1 {
-            return (headerCommands, headerRichWorkspace, 0)
-        } else if section > 0 && dataSource.numberOfSections() > 1 {
-            return (0, 0, headerSection)
-        } else {
-            return (0, 0, 0)
-        }
-    }
-
     // MARK: - BackgroundImageColor Delegate
 
     func colorPickerCancel() {
@@ -1815,12 +1794,14 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 }
 
                 header.delegate = self
-                header.setStatusButton(count: dataSource.metadatasSource.count)
-                header.setTitleSorted(datasourceTitleButton: layoutForView?.titleButtonHeader ?? "")
-                header.setRichWorkspaceText(richWorkspaceText: richWorkspaceText)
+                header.setStatusButtonOne(count: dataSource.metadatasSource.count)
+                header.setSortedTitle(layoutForView?.titleButtonHeader ?? "")
+                header.setRichWorkspaceText(richWorkspaceText)
                 header.labelSection.text = self.dataSource.getSectionValue(indexPath: indexPath).firstUppercased
                 header.labelSection.textColor = NCBrandColor.shared.brandElement
 
+                header.setButtonsOneHeight(heightButtonsOne)
+                header.setButtonsTwoHeight(heightButtonsTwo)
                 header.setRichWorkspaceHeight(heightHeaderRichWorkspace)
                 header.setSectionHeight(heightHeaderSection)
 
@@ -1854,6 +1835,28 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
 
 extension NCCollectionViewCommon: UICollectionViewDelegateFlowLayout {
 
+    func getHeaderHeight(section:Int) -> (heightHeaderCommands: CGFloat, heightHeaderRichWorkspace: CGFloat, heightHeaderSection: CGFloat) {
+
+        var headerRichWorkspace: CGFloat = 0
+
+        if let richWorkspaceText = richWorkspaceText {
+            let trimmed = richWorkspaceText.trimmingCharacters(in: .whitespaces)
+            if trimmed.count > 0 && !isSearching {
+                headerRichWorkspace = UIScreen.main.bounds.size.height / 6
+            }
+        }
+
+        if section == 0 && dataSource.numberOfSections() > 1 {
+            return (heightButtonsOne + heightButtonsTwo, headerRichWorkspace, heightSection)
+        } else if section == 0 && dataSource.numberOfSections() == 1 {
+            return (heightButtonsOne + heightButtonsTwo, headerRichWorkspace, 0)
+        } else if section > 0 && dataSource.numberOfSections() > 1 {
+            return (0, 0, heightSection)
+        } else {
+            return (0, 0, 0)
+        }
+    }
+
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
 
         let (heightHeaderCommands, heightHeaderRichWorkspace, heightHeaderSection) = getHeaderHeight(section: section)

+ 48 - 26
iOSClient/Main/Section Header Footer/NCSectionHeaderFooter.swift

@@ -33,18 +33,22 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
     @IBOutlet weak var buttonCreateFolder: UIButton!
     @IBOutlet weak var buttonScanDocument: UIButton!
 
-    @IBOutlet weak var viewButton: UIView!
-    @IBOutlet weak var buttonOrderWidthConstraint: NSLayoutConstraint!
+    @IBOutlet weak var viewButtonsOne: UIView!
+    @IBOutlet weak var viewButtonsTwo: UIView!
+    @IBOutlet weak var viewSeparator: UIView!
     @IBOutlet weak var viewRichWorkspace: UIView!
-    @IBOutlet weak var textViewRichWorkspace: UITextView!
-    @IBOutlet weak var separator: UIView!
-    @IBOutlet weak var separatorHeightConstraint: NSLayoutConstraint!
     @IBOutlet weak var viewSection: UIView!
-    @IBOutlet weak var labelSection: UILabel!
 
+    @IBOutlet weak var viewButtonsOneHeightConstraint: NSLayoutConstraint!
+    @IBOutlet weak var viewButtonsTwoHeightConstraint: NSLayoutConstraint!
+    @IBOutlet weak var viewSeparatorHeightConstraint: NSLayoutConstraint!
     @IBOutlet weak var viewRichWorkspaceHeightConstraint: NSLayoutConstraint!
     @IBOutlet weak var viewSectionHeightConstraint: NSLayoutConstraint!
 
+    @IBOutlet weak var textViewRichWorkspace: UITextView!
+    @IBOutlet weak var labelSection: UILabel!
+
+
     weak var delegate: NCSectionHeaderMenuDelegate?
 
     private var markdownParser = MarkdownParser()
@@ -72,7 +76,7 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         buttonUpload.layer.cornerRadius = 3
         buttonUpload.setImage(imageUpload, for: .normal)
 
-        let imageFolder = UIImage(named: "folder")!.image(color: NCBrandColor.shared.systemGray2, size: 25)
+        let imageFolder = UIImage(named: "buttonCreateFolder")!.image(color: NCBrandColor.shared.systemGray2, size: 25)
         buttonCreateFolder.backgroundColor = .clear
         buttonCreateFolder.setTitleColor(.systemBlue, for: .normal)
         buttonCreateFolder.setTitle(NSLocalizedString("_folder_", comment: ""), for: .normal)
@@ -105,8 +109,8 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         tap.delegate = self
         viewRichWorkspace?.addGestureRecognizer(tap)
 
-        separator.backgroundColor = NCBrandColor.shared.separator
-        separatorHeightConstraint.constant = 0.5
+        viewSeparator.backgroundColor = NCBrandColor.shared.separator
+        viewSeparatorHeightConstraint.constant = 0.5
 
         markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: NCBrandColor.shared.label)
         markdownParser.header.font = UIFont.systemFont(ofSize: 25)
@@ -129,6 +133,8 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         setGradientColor()
     }
 
+    //MARK: -
+
     func setGradientColor() {
         if traitCollection.userInterfaceStyle == .dark {
             gradient.colors = [UIColor(white: 0, alpha: 0).cgColor, UIColor.black.cgColor]
@@ -137,17 +143,25 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         }
     }
 
-    func setTitleSorted(datasourceTitleButton: String) {
+    func setSortedTitle(_ title: String) {
 
-        let title = NSLocalizedString(datasourceTitleButton, comment: "")
-        let size = title.size(withAttributes: [.font: buttonOrder.titleLabel?.font as Any])
+        let title = NSLocalizedString(title, comment: "")
+        //let size = title.size(withAttributes: [.font: buttonOrder.titleLabel?.font as Any])
 
         buttonOrder.setTitle(title, for: .normal)
-        buttonOrderWidthConstraint.constant = size.width + 5
     }
 
-    func setStatusButton(count: Int) {
+    func setRichWorkspaceText(_ text: String?) {
+        guard let text = text else { return }
+        if text != self.richWorkspaceText {
+            textViewRichWorkspace.attributedText = markdownParser.parse(text)
+            self.richWorkspaceText = text
+        }
+    }
+
+    //MARK: -
 
+    func setStatusButtonOne(count: Int) {
         if count == 0 {
             buttonSwitch.isEnabled = false
             buttonOrder.isEnabled = false
@@ -159,16 +173,31 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         }
     }
 
-    func setRichWorkspaceText(richWorkspaceText: String?) {
-        guard let richWorkspaceText = richWorkspaceText else { return }
-        if richWorkspaceText != self.richWorkspaceText {
-            textViewRichWorkspace.attributedText = markdownParser.parse(richWorkspaceText)
-            self.richWorkspaceText = richWorkspaceText
+    func setButtonsOneHeight(_ size:CGFloat) {
+        viewButtonsOneHeightConstraint.constant = size
+        if size == 0 {
+            viewButtonsOne.isHidden = true
+        } else {
+            viewButtonsOne.isHidden = false
+        }
+    }
+
+    func setButtonsTwoHeight(_ size:CGFloat) {
+        viewButtonsTwoHeightConstraint.constant = size
+        if size == 0 {
+            viewButtonsTwo.isHidden = true
+        } else {
+            viewButtonsTwo.isHidden = false
         }
     }
 
     func setRichWorkspaceHeight(_ size: CGFloat) {
         viewRichWorkspaceHeightConstraint.constant = size
+        if size == 0 {
+            viewRichWorkspace.isHidden = true
+        } else {
+            viewRichWorkspace.isHidden = false
+        }
     }
 
     func setSectionHeight(_ size:CGFloat) {
@@ -180,13 +209,6 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
         }
     }
 
-    func SetHideButtonsPlus(_ isHidden: Bool) {
-        viewButton.isHidden = isHidden
-        buttonUpload.isHidden = isHidden
-        buttonCreateFolder.isHidden = isHidden
-        buttonScanDocument.isHidden = isHidden
-    }
-
     @IBAction func touchUpInsideMore(_ sender: Any) {
         delegate?.tapMoreHeader(sender: sender)
     }

+ 89 - 90
iOSClient/Main/Section Header Footer/NCSectionHeaderMenu.xib

@@ -15,11 +15,64 @@
             <rect key="frame" x="0.0" y="0.0" width="551" height="211"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QBu-GJ-Y52" userLabel="View Menu">
-                    <rect key="frame" x="0.0" y="0.0" width="551" height="111"/>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4m9-yf-RbB">
+                    <rect key="frame" x="0.0" y="0.0" width="551" height="50"/>
+                    <subviews>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hie-dN-B9L">
+                            <rect key="frame" x="10" y="5" width="96" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="X1Q-Rt-PQI"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                            <inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="8" maxY="0.0"/>
+                            <inset key="imageEdgeInsets" minX="-8" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="Button 1" image="buttonCreateFolder"/>
+                            <connections>
+                                <action selector="touchUpInsideButtonUpload:" destination="tys-A2-nDX" eventType="touchUpInside" id="PRS-wE-LRC"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cjh-je-E6h">
+                            <rect key="frame" x="116" y="5" width="98" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="Zjv-nS-ufy"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                            <inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="8" maxY="0.0"/>
+                            <inset key="imageEdgeInsets" minX="-8" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="Button 2" image="buttonCreateFolder"/>
+                            <connections>
+                                <action selector="touchUpInsideButtonCreateFolder:" destination="tys-A2-nDX" eventType="touchUpInside" id="v9i-Kt-hbI"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Zta-tv-COt">
+                            <rect key="frame" x="224" y="5" width="98" height="40"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="Dm7-86-DVq"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                            <inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="8" maxY="0.0"/>
+                            <inset key="imageEdgeInsets" minX="-8" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <state key="normal" title="Button 2" image="buttonCreateFolder"/>
+                            <connections>
+                                <action selector="touchUpInsideButtonScanDocument:" destination="tys-A2-nDX" eventType="touchUpInside" id="chM-32-kSs"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <constraints>
+                        <constraint firstItem="cjh-je-E6h" firstAttribute="leading" secondItem="Hie-dN-B9L" secondAttribute="trailing" constant="10" id="5aP-yP-Qrg"/>
+                        <constraint firstItem="Zta-tv-COt" firstAttribute="leading" secondItem="cjh-je-E6h" secondAttribute="trailing" constant="10" id="6hB-av-smB"/>
+                        <constraint firstItem="Zta-tv-COt" firstAttribute="centerY" secondItem="cjh-je-E6h" secondAttribute="centerY" id="Fcu-ai-2K5"/>
+                        <constraint firstItem="Hie-dN-B9L" firstAttribute="leading" secondItem="4m9-yf-RbB" secondAttribute="leading" constant="10" id="GNB-In-2UC"/>
+                        <constraint firstItem="cjh-je-E6h" firstAttribute="centerY" secondItem="Hie-dN-B9L" secondAttribute="centerY" id="Wan-Qr-mdA"/>
+                        <constraint firstAttribute="height" constant="50" id="aJx-Rv-Dc0"/>
+                        <constraint firstItem="Hie-dN-B9L" firstAttribute="centerY" secondItem="4m9-yf-RbB" secondAttribute="centerY" id="juu-q8-XGo"/>
+                    </constraints>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="s4I-Jo-yCE">
+                    <rect key="frame" x="0.0" y="50" width="551" height="40"/>
                     <subviews>
                         <button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1LD-cd-zhc">
-                            <rect key="frame" x="12" y="10" width="25" height="25"/>
+                            <rect key="frame" x="10" y="7.5" width="25" height="25"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="25" id="D76-X9-Tw9"/>
                                 <constraint firstAttribute="height" constant="25" id="izT-Ru-XYG"/>
@@ -30,10 +83,7 @@
                             </connections>
                         </button>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0bo-yl-t5k">
-                            <rect key="frame" x="55" y="8.5" width="230" height="28"/>
-                            <constraints>
-                                <constraint firstAttribute="width" constant="230" id="jvv-Ug-l3I"/>
-                            </constraints>
+                            <rect key="frame" x="45" y="6" width="163" height="28"/>
                             <fontDescription key="fontDescription" type="system" pointSize="13"/>
                             <state key="normal" title="Sort by name (from A to Z)">
                                 <color key="titleColor" systemColor="darkTextColor"/>
@@ -43,7 +93,7 @@
                             </connections>
                         </button>
                         <button hidden="YES" opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="D0O-wK-14O">
-                            <rect key="frame" x="514" y="10" width="25" height="25"/>
+                            <rect key="frame" x="506" y="7.5" width="25" height="25"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="25" id="aEr-j8-JDO"/>
                                 <constraint firstAttribute="height" constant="25" id="bvx-Uh-NWD"/>
@@ -53,81 +103,23 @@
                                 <action selector="touchUpInsideMore:" destination="tys-A2-nDX" eventType="touchUpInside" id="Jyu-Mx-nWq"/>
                             </connections>
                         </button>
-                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LZu-Te-clJ" userLabel="Separator">
-                            <rect key="frame" x="0.0" y="110" width="551" 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="VuP-sT-hUI"/>
-                            </constraints>
-                        </view>
-                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4m9-yf-RbB">
-                            <rect key="frame" x="0.0" y="50" width="551" height="61"/>
-                            <subviews>
-                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Hie-dN-B9L">
-                                    <rect key="frame" x="10" y="11" width="96" height="40"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="40" id="X1Q-Rt-PQI"/>
-                                    </constraints>
-                                    <fontDescription key="fontDescription" type="system" pointSize="12"/>
-                                    <inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="8" maxY="0.0"/>
-                                    <inset key="imageEdgeInsets" minX="-8" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                                    <state key="normal" title="Button 1" image="tv" catalog="system"/>
-                                    <connections>
-                                        <action selector="touchUpInsideButtonUpload:" destination="tys-A2-nDX" eventType="touchUpInside" id="PRS-wE-LRC"/>
-                                    </connections>
-                                </button>
-                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cjh-je-E6h">
-                                    <rect key="frame" x="116" y="11" width="98" height="40"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="40" id="Zjv-nS-ufy"/>
-                                    </constraints>
-                                    <fontDescription key="fontDescription" type="system" pointSize="12"/>
-                                    <inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="8" maxY="0.0"/>
-                                    <inset key="imageEdgeInsets" minX="-8" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                                    <state key="normal" title="Button 2" image="tv" catalog="system"/>
-                                    <connections>
-                                        <action selector="touchUpInsideButtonCreateFolder:" destination="tys-A2-nDX" eventType="touchUpInside" id="v9i-Kt-hbI"/>
-                                    </connections>
-                                </button>
-                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Zta-tv-COt">
-                                    <rect key="frame" x="224" y="11" width="98" height="40"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="40" id="Dm7-86-DVq"/>
-                                    </constraints>
-                                    <fontDescription key="fontDescription" type="system" pointSize="12"/>
-                                    <inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="8" maxY="0.0"/>
-                                    <inset key="imageEdgeInsets" minX="-8" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                                    <state key="normal" title="Button 2" image="tv" catalog="system"/>
-                                    <connections>
-                                        <action selector="touchUpInsideButtonScanDocument:" destination="tys-A2-nDX" eventType="touchUpInside" id="chM-32-kSs"/>
-                                    </connections>
-                                </button>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="cjh-je-E6h" firstAttribute="leading" secondItem="Hie-dN-B9L" secondAttribute="trailing" constant="10" id="5aP-yP-Qrg"/>
-                                <constraint firstItem="Zta-tv-COt" firstAttribute="leading" secondItem="cjh-je-E6h" secondAttribute="trailing" constant="10" id="6hB-av-smB"/>
-                                <constraint firstItem="Zta-tv-COt" firstAttribute="centerY" secondItem="cjh-je-E6h" secondAttribute="centerY" id="Fcu-ai-2K5"/>
-                                <constraint firstItem="Hie-dN-B9L" firstAttribute="leading" secondItem="4m9-yf-RbB" secondAttribute="leading" constant="10" id="GNB-In-2UC"/>
-                                <constraint firstItem="cjh-je-E6h" firstAttribute="centerY" secondItem="Hie-dN-B9L" secondAttribute="centerY" id="Wan-Qr-mdA"/>
-                                <constraint firstAttribute="bottom" secondItem="Hie-dN-B9L" secondAttribute="bottom" constant="10" id="kl1-Im-JkD"/>
-                            </constraints>
-                        </view>
                     </subviews>
                     <constraints>
-                        <constraint firstItem="1LD-cd-zhc" firstAttribute="leading" secondItem="QBu-GJ-Y52" secondAttribute="leading" constant="12" id="3bI-Ld-Ddl"/>
-                        <constraint firstAttribute="trailing" secondItem="LZu-Te-clJ" secondAttribute="trailing" id="4Ue-ug-B6K"/>
-                        <constraint firstItem="1LD-cd-zhc" firstAttribute="top" secondItem="QBu-GJ-Y52" secondAttribute="top" constant="10" id="6P3-o3-2qv"/>
-                        <constraint firstAttribute="bottom" secondItem="LZu-Te-clJ" secondAttribute="bottom" id="DDK-aB-wEh"/>
-                        <constraint firstItem="4m9-yf-RbB" firstAttribute="leading" secondItem="QBu-GJ-Y52" secondAttribute="leading" id="F59-vX-9qO"/>
-                        <constraint firstAttribute="bottom" secondItem="4m9-yf-RbB" secondAttribute="bottom" id="Mk0-OY-HUe"/>
-                        <constraint firstItem="4m9-yf-RbB" firstAttribute="top" secondItem="QBu-GJ-Y52" secondAttribute="top" constant="50" id="aRU-Ec-O4g"/>
-                        <constraint firstItem="D0O-wK-14O" firstAttribute="centerY" secondItem="1LD-cd-zhc" secondAttribute="centerY" id="bgO-UA-bhj"/>
-                        <constraint firstItem="LZu-Te-clJ" firstAttribute="leading" secondItem="QBu-GJ-Y52" secondAttribute="leading" id="c4q-XY-3mD"/>
-                        <constraint firstAttribute="trailing" secondItem="4m9-yf-RbB" secondAttribute="trailing" id="oRr-JT-w9v"/>
-                        <constraint firstAttribute="trailing" secondItem="D0O-wK-14O" secondAttribute="trailing" constant="12" id="qZw-Ob-In1"/>
-                        <constraint firstItem="0bo-yl-t5k" firstAttribute="leading" secondItem="1LD-cd-zhc" secondAttribute="trailing" constant="18" id="tBF-23-TJ4"/>
-                        <constraint firstItem="0bo-yl-t5k" firstAttribute="centerY" secondItem="1LD-cd-zhc" secondAttribute="centerY" id="wdV-T7-dwy"/>
+                        <constraint firstItem="1LD-cd-zhc" firstAttribute="centerY" secondItem="s4I-Jo-yCE" secondAttribute="centerY" id="8g7-gD-kjH"/>
+                        <constraint firstItem="0bo-yl-t5k" firstAttribute="centerY" secondItem="1LD-cd-zhc" secondAttribute="centerY" id="URP-Ct-vPP"/>
+                        <constraint firstItem="D0O-wK-14O" firstAttribute="centerY" secondItem="1LD-cd-zhc" secondAttribute="centerY" id="UUF-sF-n6M"/>
+                        <constraint firstItem="0bo-yl-t5k" firstAttribute="leading" secondItem="1LD-cd-zhc" secondAttribute="trailing" constant="10" id="VBJ-H7-cJ3"/>
+                        <constraint firstAttribute="trailing" secondItem="D0O-wK-14O" secondAttribute="trailing" constant="20" id="WZh-iW-MXC"/>
+                        <constraint firstItem="1LD-cd-zhc" firstAttribute="leading" secondItem="s4I-Jo-yCE" secondAttribute="leading" constant="10" id="dGi-5z-MEh"/>
+                        <constraint firstAttribute="height" constant="40" id="vvG-dH-6c1"/>
+                    </constraints>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LZu-Te-clJ">
+                    <rect key="frame" x="0.0" y="90" width="551" 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="VuP-sT-hUI"/>
                     </constraints>
                 </view>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NC1-5C-E5z" userLabel="View RichWorkspace">
@@ -169,42 +161,49 @@
             </subviews>
             <viewLayoutGuide key="safeArea" id="pm7-uW-mZE"/>
             <constraints>
-                <constraint firstItem="QBu-GJ-Y52" firstAttribute="leading" secondItem="pm7-uW-mZE" secondAttribute="leading" id="2Jt-JT-Jbi"/>
                 <constraint firstItem="f9U-NY-4OS" firstAttribute="leading" secondItem="pm7-uW-mZE" secondAttribute="leading" id="7kv-IL-kwZ"/>
-                <constraint firstItem="NC1-5C-E5z" firstAttribute="top" secondItem="QBu-GJ-Y52" secondAttribute="bottom" id="B4d-JR-jzS"/>
+                <constraint firstItem="s4I-Jo-yCE" firstAttribute="leading" secondItem="pm7-uW-mZE" secondAttribute="leading" id="CaM-Eb-nHq"/>
+                <constraint firstItem="LZu-Te-clJ" firstAttribute="leading" secondItem="pm7-uW-mZE" secondAttribute="leading" id="CyS-jg-0vc"/>
                 <constraint firstItem="pm7-uW-mZE" firstAttribute="trailing" secondItem="f9U-NY-4OS" secondAttribute="trailing" id="GbG-un-mCe"/>
-                <constraint firstItem="pm7-uW-mZE" firstAttribute="trailing" secondItem="QBu-GJ-Y52" secondAttribute="trailing" id="Km2-dk-R7v"/>
+                <constraint firstItem="pm7-uW-mZE" firstAttribute="trailing" secondItem="LZu-Te-clJ" secondAttribute="trailing" id="NiW-2m-3HS"/>
                 <constraint firstItem="NC1-5C-E5z" firstAttribute="leading" secondItem="pm7-uW-mZE" secondAttribute="leading" id="QpF-nE-s7J"/>
+                <constraint firstItem="s4I-Jo-yCE" firstAttribute="top" secondItem="4m9-yf-RbB" secondAttribute="bottom" id="TpE-MD-W1E"/>
                 <constraint firstItem="pm7-uW-mZE" firstAttribute="trailing" secondItem="NC1-5C-E5z" secondAttribute="trailing" id="UH6-8N-JUD"/>
-                <constraint firstItem="QBu-GJ-Y52" firstAttribute="top" secondItem="pm7-uW-mZE" secondAttribute="top" id="auA-nX-bqB"/>
+                <constraint firstItem="4m9-yf-RbB" firstAttribute="leading" secondItem="pm7-uW-mZE" secondAttribute="leading" id="VkE-Yd-ZEU"/>
+                <constraint firstItem="pm7-uW-mZE" firstAttribute="trailing" secondItem="4m9-yf-RbB" secondAttribute="trailing" id="cQo-N7-86S"/>
+                <constraint firstItem="LZu-Te-clJ" firstAttribute="top" secondItem="s4I-Jo-yCE" secondAttribute="bottom" id="ede-24-v8F"/>
                 <constraint firstItem="pm7-uW-mZE" firstAttribute="bottom" secondItem="f9U-NY-4OS" secondAttribute="bottom" id="eyu-CE-rTX"/>
+                <constraint firstItem="pm7-uW-mZE" firstAttribute="trailing" secondItem="s4I-Jo-yCE" secondAttribute="trailing" id="oCg-UW-8TQ"/>
+                <constraint firstItem="4m9-yf-RbB" firstAttribute="top" secondItem="pm7-uW-mZE" secondAttribute="top" id="oKs-0n-Lan"/>
                 <constraint firstItem="NC1-5C-E5z" firstAttribute="bottom" secondItem="f9U-NY-4OS" secondAttribute="top" id="pmY-5s-Pv2"/>
             </constraints>
             <connections>
                 <outlet property="buttonCreateFolder" destination="cjh-je-E6h" id="RUW-w2-cfw"/>
                 <outlet property="buttonMore" destination="D0O-wK-14O" id="eEx-3R-zCS"/>
                 <outlet property="buttonOrder" destination="0bo-yl-t5k" id="Kbw-BG-73C"/>
-                <outlet property="buttonOrderWidthConstraint" destination="jvv-Ug-l3I" id="E6N-z6-2VC"/>
                 <outlet property="buttonScanDocument" destination="Zta-tv-COt" id="D7n-8P-5l4"/>
                 <outlet property="buttonSwitch" destination="1LD-cd-zhc" id="Ec2-cM-CoY"/>
                 <outlet property="buttonUpload" destination="Hie-dN-B9L" id="AfM-W6-RDX"/>
                 <outlet property="labelSection" destination="mB5-5n-AL9" id="uxf-bN-nZA"/>
-                <outlet property="separator" destination="LZu-Te-clJ" id="EwO-za-LxT"/>
-                <outlet property="separatorHeightConstraint" destination="VuP-sT-hUI" id="5wS-ww-yKo"/>
                 <outlet property="textViewRichWorkspace" destination="pYo-pF-MGv" id="2h4-LP-T1z"/>
-                <outlet property="viewButton" destination="4m9-yf-RbB" id="TWT-zu-Ij8"/>
+                <outlet property="viewButtonsOne" destination="4m9-yf-RbB" id="ym1-m0-plm"/>
+                <outlet property="viewButtonsOneHeightConstraint" destination="aJx-Rv-Dc0" id="rk9-2d-ia8"/>
+                <outlet property="viewButtonsTwo" destination="s4I-Jo-yCE" id="15J-J1-EAl"/>
+                <outlet property="viewButtonsTwoHeightConstraint" destination="vvG-dH-6c1" id="ELG-Xi-vlb"/>
                 <outlet property="viewRichWorkspace" destination="NC1-5C-E5z" id="NyN-tr-sJl"/>
                 <outlet property="viewRichWorkspaceHeightConstraint" destination="eT3-4m-mJ6" id="agb-tE-jhw"/>
                 <outlet property="viewSection" destination="f9U-NY-4OS" id="idM-C9-2nP"/>
                 <outlet property="viewSectionHeightConstraint" destination="ZcL-Wd-xhN" id="RDs-yy-I6W"/>
+                <outlet property="viewSeparator" destination="LZu-Te-clJ" id="rz1-2Q-vEK"/>
+                <outlet property="viewSeparatorHeightConstraint" destination="VuP-sT-hUI" id="QHV-oY-E5w"/>
             </connections>
             <point key="canvasLocation" x="349.60000000000002" y="55.322338830584712"/>
         </collectionReusableView>
     </objects>
     <resources>
+        <image name="buttonCreateFolder" width="25" height="25"/>
         <image name="moreBig" width="50" height="50"/>
         <image name="switchList" width="25" height="25"/>
-        <image name="tv" catalog="system" width="128" height="97"/>
         <systemColor name="darkTextColor">
             <color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>

+ 2 - 2
iOSClient/Networking/NCNetworking.swift

@@ -936,14 +936,14 @@ import Queuer
         var searchFiles: [tableMetadata] = []
         var errCode = 0
         var errDescr = ""
-        let concurrentQueue = DispatchQueue(label: "concurrentQueue", attributes: .concurrent)
+        let concurrentQueue = DispatchQueue(label: "com.nextcloud.requestUnifiedSearch.concurrentQueue", attributes: .concurrent)
         let dispatchGroup = DispatchGroup()
         dispatchGroup.enter()
         dispatchGroup.notify(queue: .main) {
             completion(Array(searchFiles), errCode, errDescr)
         }
 
-        NCCommunication.shared.unifiedSearch(term: literal, timeout: 60) { provider in
+        NCCommunication.shared.unifiedSearch(term: literal, timeout: 30, timeoutProvider: 90) { provider in
             // example filter
             // ["calendar", "files", "fulltextsearch"].contains(provider.id)
             return true

+ 3 - 3
iOSClient/Select/NCSelect.swift

@@ -374,10 +374,10 @@ extension NCSelect: UICollectionViewDataSource {
             }
 
             header.delegate = self
-            header.setStatusButton(count: dataSource.metadatasSource.count)
-            header.setTitleSorted(datasourceTitleButton: layoutForView?.titleButtonHeader ?? "")
+            header.setStatusButtonOne(count: dataSource.metadatasSource.count)
+            header.setSortedTitle(layoutForView?.titleButtonHeader ?? "")
             header.viewRichWorkspaceHeightConstraint.constant = headerRichWorkspaceHeight
-            header.setRichWorkspaceText(richWorkspaceText: richWorkspaceText)
+            header.setRichWorkspaceText(richWorkspaceText)
 
             return header