marinofaggiana 6 years ago
parent
commit
27305d8678
1 changed files with 5 additions and 1 deletions
  1. 5 1
      iOSClient/Media/NCMedia.swift

+ 5 - 1
iOSClient/Media/NCMedia.swift

@@ -129,7 +129,7 @@ class NCMedia: UIViewController ,UICollectionViewDataSource, UICollectionViewDel
         super.viewDidAppear(animated)
         
         collectionView?.reloadDataThenPerform {
-            self.downloadThumbnail()
+            self.selectSearchSections()
         }
     }
     
@@ -454,6 +454,10 @@ class NCMedia: UIViewController ,UICollectionViewDataSource, UICollectionViewDel
     
     private func selectSearchSections() {
         
+        if appDelegate.activeAccount.count == 0 {
+            return
+        }
+        
         let sections = NSMutableSet()
         let lastDate = NCManageDatabase.sharedInstance.getTableMediaDate(account: self.appDelegate.activeAccount, order: .orderedDescending)
         var gteDate: Date?