Browse Source

fix

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 years ago
parent
commit
c5b9d3b859

+ 1 - 2
iOSClient/Activity/NCActivityTableViewCell.swift

@@ -47,7 +47,6 @@ class NCActivityTableViewCell: UITableViewCell, NCCellProtocol {
     private var user: String = ""
     private var user: String = ""
 
 
     var idActivity: Int = 0
     var idActivity: Int = 0
-    var account: String = ""
     var activityPreviews: [tableActivityPreview] = []
     var activityPreviews: [tableActivityPreview] = []
     var didSelectItemEnable: Bool = true
     var didSelectItemEnable: Bool = true
     var viewController: UIViewController?
     var viewController: UIViewController?
@@ -240,7 +239,7 @@ extension NCActivityTableViewCell: UICollectionViewDataSource {
 
 
             } else {
             } else {
 
 
-                if let activitySubjectRich = NCManageDatabase.shared.getActivitySubjectRich(account: account, idActivity: idActivity, id: fileId) {
+                if let activitySubjectRich = NCManageDatabase.shared.getActivitySubjectRich(account: activityPreview.account, idActivity: idActivity, id: fileId) {
 
 
                     let fileNamePath = CCUtility.getDirectoryUserData() + "/" + activitySubjectRich.name
                     let fileNamePath = CCUtility.getDirectoryUserData() + "/" + activitySubjectRich.name
 
 

+ 4 - 2
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -1558,7 +1558,9 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 cell.filePreviewImageView?.image = NCBrandColor.cacheImages.folderExternal
                 cell.filePreviewImageView?.image = NCBrandColor.cacheImages.folderExternal
             } else if metadata.fileName == autoUploadFileName && metadata.serverUrl == autoUploadDirectory {
             } else if metadata.fileName == autoUploadFileName && metadata.serverUrl == autoUploadDirectory {
                 cell.filePreviewImageView?.image = NCBrandColor.cacheImages.folderAutomaticUpload
                 cell.filePreviewImageView?.image = NCBrandColor.cacheImages.folderAutomaticUpload
-                cell.fileTitleLabel?.text = (cell.fileTitleLabel?.text ?? "") + " - " + NSLocalizedString("_auto_upload_folder_", comment: "")
+                if cell is NCListCell {
+                    cell.fileTitleLabel?.text = (cell.fileTitleLabel?.text ?? "") + " - " + NSLocalizedString("_auto_upload_folder_", comment: "")
+                }
             } else {
             } else {
                 cell.filePreviewImageView?.image = NCBrandColor.cacheImages.folder
                 cell.filePreviewImageView?.image = NCBrandColor.cacheImages.folder
             }
             }
@@ -1699,7 +1701,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
         }
         }
 
 
 
 
-        return cell as! UICollectionViewCell
+        return cell
     }
     }
 
 
     func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
     func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {