|
@@ -1004,10 +1004,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
@objc func reloadDataSource(forced: Bool = true) {
|
|
|
guard !appDelegate.account.isEmpty else { return }
|
|
|
|
|
|
-
|
|
|
- let directory = NCManageDatabase.shared.getTableDirectory(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", appDelegate.account, serverUrl))
|
|
|
- richWorkspaceText = directory?.richWorkspace
|
|
|
-
|
|
|
|
|
|
isEncryptedFolder = CCUtility.isFolderEncrypted(serverUrl, e2eEncrypted: metadataFolder?.e2eEncrypted ?? false, account: appDelegate.account, urlBase: appDelegate.urlBase)
|
|
|
|
|
@@ -1016,7 +1012,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
autoUploadDirectory = NCManageDatabase.shared.getAccountAutoUploadDirectory(urlBase: appDelegate.urlBase, account: appDelegate.account)
|
|
|
|
|
|
|
|
|
-
|
|
|
+ layoutForView = NCUtility.shared.getLayoutForView(key: layoutKey, serverUrl: serverUrl)
|
|
|
|
|
|
|
|
|
if !self.isSearching && layoutForView?.layout == NCGlobal.shared.layoutGrid {
|
|
@@ -1449,39 +1445,20 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
|
|
|
(cell as! NCCellProtocol).filePreviewImageView?.image = NCBrandColor.cacheImages.file
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if !metadata.iconUrl.isEmpty {
|
|
|
if let ownerId = NCUtility.shared.getAvatarFromIconUrl(metadata: metadata), let cell = cell as? NCCellProtocol {
|
|
|
let fileName = metadata.userBaseUrl + "-" + ownerId + ".png"
|
|
|
NCOperationQueue.shared.downloadAvatar(user: ownerId, dispalyName: nil, fileName: fileName, cell: cell, view: collectionView, cellImageView: cell.filePreviewImageView)
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
- if metadata.iconUrl.starts(with: "/apps") {
|
|
|
-
|
|
|
- } else if metadata.iconUrl.contains("http") && metadata.iconUrl.contains("avatar") {
|
|
|
- let splitIconUrl = metadata.iconUrl.components(separatedBy: "/")
|
|
|
- var found:Bool = false
|
|
|
- var ownerId: String = ""
|
|
|
- for item in splitIconUrl {
|
|
|
- if found {
|
|
|
- ownerId = item
|
|
|
- break
|
|
|
- }
|
|
|
- if item == "avatar" { found = true}
|
|
|
- }
|
|
|
- let fileName = metadata.userBaseUrl + "-" + ownerId + ".png"
|
|
|
- if let cell = cell as? NCCellProtocol {
|
|
|
- NCOperationQueue.shared.downloadAvatar(user: ownerId, dispalyName: nil, fileName: fileName, cell: cell, view: collectionView, cellImageView: cell.filePreviewImageView)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- */
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|