|
@@ -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 }
|
|
|
- }
|
|
|
- })
|
|
|
- */
|
|
|
}
|
|
|
}
|
|
|
}
|