Explorar el Código

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana hace 2 años
padre
commit
f23addeb71

+ 2 - 2
iOSClient/Data/NCDataSource.swift

@@ -68,7 +68,7 @@ class NCDataSource: NSObject {
         self.sectionsValue.removeAll()
     }
 
-    func createSections() {
+    internal func createSections() {
 
         self.sectionsValue = metadatasSource.map { getSectionValue(metadata: $0) }
         self.sectionsValue = Array(Set(self.sectionsValue))
@@ -81,7 +81,7 @@ class NCDataSource: NSObject {
         }
     }
 
-    func createMetadataForSection(sectionValue: String) {
+    internal func createMetadataForSection(sectionValue: String) {
 
         let metadatas = metadatasSource.filter({ getSectionValue(metadata: $0) == sectionValue})
         let metadataForSection = NCMetadatasForSection.init(sectionValue: sectionValue, metadatas: metadatas, sort: self.sort, ascending: self.ascending, directoryOnTop: self.directoryOnTop, favoriteOnTop: self.favoriteOnTop, filterLivePhoto: self.filterLivePhoto)

+ 1 - 1
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -692,7 +692,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
             return (headerCommand, headerRichWorkspace, headerSection)
         } else if section == 0 && dataSource.numberOfSections() == 1 {
             return (headerCommand, headerRichWorkspace, 0)
-        } else if section > 1 && dataSource.numberOfSections() > 1 {
+        } else if section > 0 && dataSource.numberOfSections() > 1 {
             return (0, 0, headerSection)
         } else {
             return (0, 0, 0)