marinofaggiana 6 years ago
parent
commit
4b16ae66f8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      iOSClient/Media/NCMedia.swift

+ 4 - 0
iOSClient/Media/NCMedia.swift

@@ -458,6 +458,10 @@ class NCMedia: UIViewController ,UICollectionViewDataSource, UICollectionViewDel
     
     public func collectionViewReloadDataSource(loadNetworkDatasource: Bool) {
         
+        if appDelegate.activeAccount.count == 0 {
+            return
+        }
+        
         DispatchQueue.global().async {
     
             let metadatas = NCManageDatabase.sharedInstance.getTableMedias(predicate: NSPredicate(format: "account == %@", self.appDelegate.activeAccount))