Marino Faggiana 6 سال پیش
والد
کامیت
a421110854
3فایلهای تغییر یافته به همراه5 افزوده شده و 35 حذف شده
  1. 1 1
      iOSClient/Activity/NCActivity.storyboard
  2. 3 33
      iOSClient/Activity/NCActivity.swift
  3. 1 1
      iOSClient/Networking/NCService.swift

+ 1 - 1
iOSClient/Activity/NCActivity.storyboard

@@ -59,7 +59,7 @@
                                                 </imageView>
                                                 <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="KpO-no-BMl">
                                                     <rect key="frame" x="50" y="39.666666666666657" width="325" height="50"/>
-                                                    <color key="backgroundColor" red="0.59999999999999998" green="0.80000000000000004" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="50" id="deQ-wc-jNT"/>
                                                     </constraints>

+ 3 - 33
iOSClient/Activity/NCActivity.swift

@@ -270,11 +270,11 @@ class activityTableViewCell: UITableViewCell, UICollectionViewDelegate, UICollec
             cell.imageView.image = nil
             
             let activityPreview = activityPreviews[indexPath.row]
-            
+            let fileID = String(activityPreview.fileId)
+
+            // Trashbin
             if activityPreview.view == "trashbin" {
                 
-                let fileID = String(activityPreview.fileId)
-                
                 if let activitySubjectRich = NCManageDatabase.sharedInstance.getActivitySubjectRich(account: account, idActivity: idActivity, id: fileID) {
 
                     let fileName = activitySubjectRich.name
@@ -284,7 +284,6 @@ class activityTableViewCell: UITableViewCell, UICollectionViewDelegate, UICollec
                         cell.imageView.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "folder"), multiplier: 3, color: NCBrandColor.sharedInstance.brandElement)
                         
                     } else {
-                        
                         if CCUtility.fileProviderStorageIconExists(fileID, fileNameView: activitySubjectRich.name) {
                             if let image = UIImage(contentsOfFile: CCUtility.getDirectoryProviderStorageIconFileID(fileID, fileNameView: fileName)) {
                                 cell.imageView.image = image
@@ -295,35 +294,6 @@ class activityTableViewCell: UITableViewCell, UICollectionViewDelegate, UICollec
                                     if let image = UIImage(contentsOfFile: CCUtility.getDirectoryProviderStorageIconFileID(fileID, fileNameView: fileName)) {
                                         cell.imageView.image = image
                                     }
-                                } else {
-                                    
-                                    NCUtility.sharedInstance.convertSVGtoPNGWriteToUserData(svgUrlString: activityPreview.source, fileName: nil, width: 25, rewrite: false)
-                                    
-                                    /*
-                                    let fileNameLocalPath = CCUtility.getDirectoryUserData() + "/" + (activityPreview.source as NSString).lastPathComponent
-                                    if FileManager.default.fileExists(atPath: fileNameLocalPath) {
-                                        if let image = UIImage(contentsOfFile: fileNameLocalPath) {
-                                            cell.avatar.image = image
-                                        }
-                                    } else {
-                                        DispatchQueue.global().async {
-                                            let url = self.appDelegate.activeUrl + k_avatar + activity.user + "/128"
-                                            let encodedString = url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
-                                            if let data = try? Data(contentsOf: URL(string: encodedString!)!) {
-                                                DispatchQueue.main.async {
-                                                    do {
-                                                        try data.write(to: fileNameLocalPath.url, options: .atomic)
-                                                    } catch { return }
-                                                    cell.avatar.image = UIImage(data: data)
-                                                }
-                                            }
-                                        }
-                                    }
-                                    */
-                                    
-                                    
-                                    
-                                    // default icon
                                 }
                             })
                         }

+ 1 - 1
iOSClient/Networking/NCService.swift

@@ -132,7 +132,7 @@ class NCService: NSObject {
                                 for notification in listOfNotifications! {
                                     let id = (notification as! OCNotifications).idNotification
                                     if let icon = (notification as! OCNotifications).icon {
-                                        NCUtility.sharedInstance.convertSVGtoPNGWriteToUserData(svgUrlString: icon, fileName: nil, width: 25, rewrite: false)
+                                        _ = NCUtility.sharedInstance.convertSVGtoPNGWriteToUserData(svgUrlString: icon, fileName: nil, width: 25, rewrite: false)
                                     }
                                     new = new + String(describing: id)
                                 }