marinofaggiana 4 years ago
parent
commit
77df327d54

+ 0 - 9
iOSClient/Favorites/NCFavorite.swift

@@ -468,10 +468,6 @@ extension NCFavorite: UICollectionViewDataSource {
             
             cell = collectionView.dequeueReusableCell(withReuseIdentifier: "gridCell", for: indexPath) as! NCGridCell
             
-            (cell as! NCGridCell).progressView.tintColor = NCBrandColor.sharedInstance.brandElement
-            (cell as! NCGridCell).progressView.trackTintColor = .clear
-            (cell as! NCGridCell).progressView.transform = CGAffineTransform(scaleX: 1, y: 1)
-            
             if metadata.status == k_metadataStatusInDownload  ||  metadata.status == k_metadataStatusInUpload {
                 (cell as! NCGridCell).progressView.isHidden = false
             } else {
@@ -483,11 +479,6 @@ extension NCFavorite: UICollectionViewDataSource {
             
             cell = collectionView.dequeueReusableCell(withReuseIdentifier: "listCell", for: indexPath) as! NCListCell
             
-            (cell as! NCListCell).progressView.tintColor = NCBrandColor.sharedInstance.brandElement
-            (cell as! NCListCell).progressView.trackTintColor = .clear
-            (cell as! NCListCell).progressView.transform = CGAffineTransform(scaleX: 1, y: 1)
-            (cell as! NCListCell).separator.backgroundColor = NCBrandColor.sharedInstance.separator
-            
             if metadata.status == k_metadataStatusInDownload  ||  metadata.status == k_metadataStatusInUpload {
                 (cell as! NCListCell).progressView.isHidden = false
             } else {

+ 3 - 0
iOSClient/Main/Cell/NCGridCell.swift

@@ -56,6 +56,9 @@ class NCGridCell: UICollectionViewCell, NCImageCellProtocol {
         buttonMore.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "more"), width: 50, height: 50, color: NCBrandColor.sharedInstance.optionItem), for: UIControl.State.normal)
         imageItem.layer.cornerRadius = 6
         imageItem.layer.masksToBounds = true
+        
+        progressView.tintColor = NCBrandColor.sharedInstance.brandElement
+        progressView.transform = CGAffineTransform(scaleX: 1, y: 1)
     }
     
     override func prepareForReuse() {

+ 4 - 0
iOSClient/Main/Cell/NCListCell.swift

@@ -66,6 +66,10 @@ class NCListCell: UICollectionViewCell, NCImageCellProtocol {
         separator.backgroundColor = NCBrandColor.sharedInstance.separator
         imageItem.layer.cornerRadius = 6
         imageItem.layer.masksToBounds = true
+        
+        progressView.tintColor = NCBrandColor.sharedInstance.brandElement
+        progressView.transform = CGAffineTransform(scaleX: 1, y: 1)
+        separator.backgroundColor = NCBrandColor.sharedInstance.separator
     }
     
     override func prepareForReuse() {