Browse Source

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 years ago
parent
commit
c7260b4137
1 changed files with 4 additions and 1 deletions
  1. 4 1
      iOSClient/Data/NCDataSource.swift

+ 4 - 1
iOSClient/Data/NCDataSource.swift

@@ -93,6 +93,7 @@ class NCDataSource: NSObject {
 
 
     internal func createSections() {
     internal func createSections() {
 
 
+        // get all Section
         for metadata in metadatasSource {
         for metadata in metadatasSource {
             // skipped livePhoto
             // skipped livePhoto
             if filterLivePhoto && metadata.livePhoto && metadata.ext == "mov" {
             if filterLivePhoto && metadata.livePhoto && metadata.ext == "mov" {
@@ -103,7 +104,8 @@ class NCDataSource: NSObject {
                 self.sectionsValue.append(section)
                 self.sectionsValue.append(section)
             }
             }
         }
         }
-        
+
+        // Unified search
         if let providers = self.providers, !providers.isEmpty {
         if let providers = self.providers, !providers.isEmpty {
             var sectionsDictionary: [String:Int] = [:]
             var sectionsDictionary: [String:Int] = [:]
             for section in self.sectionsValue {
             for section in self.sectionsValue {
@@ -124,6 +126,7 @@ class NCDataSource: NSObject {
 
 
         } else {
         } else {
 
 
+        // normal
             let directory = NSLocalizedString("directory", comment: "").lowercased().firstUppercased
             let directory = NSLocalizedString("directory", comment: "").lowercased().firstUppercased
             self.sectionsValue = self.sectionsValue.sorted {
             self.sectionsValue = self.sectionsValue.sorted {
                 if directoryOnTop && $0 == directory {
                 if directoryOnTop && $0 == directory {