marinofaggiana 5 år sedan
förälder
incheckning
afb1e67224

+ 0 - 12
iOSClient/Main/NCMainCommon.swift

@@ -353,18 +353,6 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
                             cell.shared.image = NCUtility.sharedInstance.createAvatar(fileNameSource: fileNameSource, fileNameSourceAvatar: fileNameSourceAvatar)
                         }
                     }
-                    /*
-                    let url = appDelegate.activeUrl + k_avatar + metadata.ownerId + "/" + k_avatar_size
-                    let encodedString = url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
-                    OCNetworking.sharedManager()?.downloadContents(ofUrl: encodedString, completion: { (data, message, errorCode) in
-                        if errorCode == 0 {
-                            do {
-                                try data!.write(to: NSURL(fileURLWithPath: fileNameSource) as URL, options: .atomic)
-                                cell.shared.image = NCUtility.sharedInstance.createAvatar(fileNameSource: fileNameSource, fileNameSourceAvatar: fileNameSourceAvatar)
-                            } catch {  }
-                        }
-                    })
-                    */
                 }
             }
             

+ 0 - 17
iOSClient/Notification/CCNotification.swift

@@ -110,7 +110,6 @@ class CCNotification: UITableViewController, CCNotificationCelllDelegate {
                         }
                     } else {
                         DispatchQueue.global().async {
-                            
                             NCCommunication.sharedInstance.downloadAvatar(urlString: self.appDelegate.activeUrl, userID: name, fileNameLocalPath: fileNameLocalPath, size: Int(k_avatar_size), account: self.appDelegate.activeAccount) { (account, data, errorCode, errorMessage) in
                                 if errorCode == 0 && account == self.appDelegate.activeAccount && UIImage(data: data!) != nil {
                                     if let image = UIImage(contentsOfFile: fileNameLocalPath) {
@@ -120,22 +119,6 @@ class CCNotification: UITableViewController, CCNotificationCelllDelegate {
                                     }
                                 }
                             }
-                            /*
-                            let url = self.appDelegate.activeUrl + k_avatar + name + "/" + k_avatar_size
-                            let encodedString = url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
-                            OCNetworking.sharedManager()?.downloadContents(ofUrl: encodedString, completion: { (data, message, errorCode) in
-                                if errorCode == 0 && UIImage(data: data!) != nil  {
-                                    do {
-                                        try data!.write(to: NSURL(fileURLWithPath: fileNameLocalPath) as URL, options: .atomic)
-                                        if let image = UIImage(contentsOfFile: fileNameLocalPath) {
-                                            cell.avatar.isHidden = false
-                                            cell.avatarLeadingMargin.constant = 50
-                                            cell.avatar.image = image
-                                        }
-                                    } catch { return }
-                                }
-                            })
-                            */
                         }
                     }
                 }

+ 0 - 14
iOSClient/Share/NCShare.swift

@@ -91,20 +91,6 @@ class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareLinkCellDel
                         self.sharedWithYouByImage.image = UIImage(named: "avatar")
                     }
                 }
-                /*
-                let url = appDelegate.activeUrl + k_avatar + metadata!.ownerId + "/" + k_avatar_size
-                let encodedString = url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
-                OCNetworking.sharedManager()?.downloadContents(ofUrl: encodedString, completion: { (data, message, errorCode) in
-                    if errorCode == 0 && UIImage(data: data!) != nil {
-                        do {
-                            try data!.write(to: NSURL(fileURLWithPath: fileNameLocalPath) as URL, options: .atomic)
-                            if let image = UIImage(contentsOfFile: fileNameLocalPath) { self.sharedWithYouByImage.image = image }
-                        } catch { return }
-                    } else {
-                        self.sharedWithYouByImage.image = UIImage(named: "avatar")
-                    }
-                })
-                */
             }
         }