|
@@ -102,7 +102,7 @@ class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareLinkCellDel
|
|
sharedWithYouByImage.image = NCUtility.shared.createAvatar(image: image, size: 40)
|
|
sharedWithYouByImage.image = NCUtility.shared.createAvatar(image: image, size: 40)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- NCCommunication.shared.downloadAvatar(user: metadata!.ownerId, fileNameLocalPath: fileNameLocalPath, size: NCGlobal.shared.avatarSize) { (account, data, errorCode, errorMessage) in
|
|
|
|
|
|
+ NCCommunication.shared.downloadAvatar(user: metadata!.ownerId, fileNameLocalPath: fileNameLocalPath, size: NCGlobal.shared.avatarSize, etag: nil) { (account, data, etag, errorCode, errorMessage) in
|
|
if errorCode == 0 && account == self.appDelegate.account && UIImage(data: data!) != nil {
|
|
if errorCode == 0 && account == self.appDelegate.account && UIImage(data: data!) != nil {
|
|
if let image = UIImage(contentsOfFile: fileNameLocalPath) {
|
|
if let image = UIImage(contentsOfFile: fileNameLocalPath) {
|
|
self.sharedWithYouByImage.image = NCUtility.shared.createAvatar(image: image, size: 40)
|
|
self.sharedWithYouByImage.image = NCUtility.shared.createAvatar(image: image, size: 40)
|
|
@@ -333,8 +333,9 @@ class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareLinkCellDel
|
|
} else {
|
|
} else {
|
|
cell.centerTitle.constant = 0
|
|
cell.centerTitle.constant = 0
|
|
}
|
|
}
|
|
- let fileNameLocalPath = String(CCUtility.getDirectoryUserData()) + "/" + String(CCUtility.getStringUser(self.appDelegate.user, urlBase: self.appDelegate.urlBase)) + "-" + sharee.label + ".png"
|
|
|
|
- NCOperationQueue.shared.downloadAvatar(user: sharee.shareWith, fileNameLocalPath: fileNameLocalPath, placeholder: UIImage(named: "avatar"), cell: cell, view: nil)
|
|
|
|
|
|
+ let userUrlBase = String(CCUtility.getStringUser(self.appDelegate.user, urlBase: self.appDelegate.urlBase))
|
|
|
|
+ let fileNameLocalPath = String(CCUtility.getDirectoryUserData()) + "/" + userUrlBase + "-" + sharee.label + ".png"
|
|
|
|
+ NCOperationQueue.shared.downloadAvatar(user: sharee.shareWith, userUrlBase: userUrlBase, fileNameLocalPath: fileNameLocalPath, placeholder: UIImage(named: "avatar"), cell: cell, view: nil)
|
|
cell.imageShareeType.image = NCShareCommon.shared.getImageShareType(shareType: sharee.shareType)
|
|
cell.imageShareeType.image = NCShareCommon.shared.getImageShareType(shareType: sharee.shareType)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -411,8 +412,9 @@ extension NCShare: UITableViewDataSource {
|
|
cell.imageStatus.image = status.onlineStatus
|
|
cell.imageStatus.image = status.onlineStatus
|
|
cell.status.text = status.statusMessage
|
|
cell.status.text = status.statusMessage
|
|
|
|
|
|
- let fileNameLocalPath = String(CCUtility.getDirectoryUserData()) + "/" + String(CCUtility.getStringUser(appDelegate.user, urlBase: appDelegate.urlBase)) + "-" + tableShare.shareWith + ".png"
|
|
|
|
- NCOperationQueue.shared.downloadAvatar(user: tableShare.shareWith, fileNameLocalPath: fileNameLocalPath, placeholder: UIImage(named: "avatar"), cell: cell, view: tableView)
|
|
|
|
|
|
+ let userUrlBase = String(CCUtility.getStringUser(appDelegate.user, urlBase: appDelegate.urlBase))
|
|
|
|
+ let fileNameLocalPath = String(CCUtility.getDirectoryUserData()) + "/" + userUrlBase + "-" + tableShare.shareWith + ".png"
|
|
|
|
+ NCOperationQueue.shared.downloadAvatar(user: tableShare.shareWith, userUrlBase: userUrlBase, fileNameLocalPath: fileNameLocalPath, placeholder: UIImage(named: "avatar"), cell: cell, view: tableView)
|
|
|
|
|
|
// If the initiator or the recipient is not the current user, show the list of sharees without any options to edit it.
|
|
// If the initiator or the recipient is not the current user, show the list of sharees without any options to edit it.
|
|
if tableShare.uidOwner != self.appDelegate.userId && tableShare.uidFileOwner != self.appDelegate.userId {
|
|
if tableShare.uidOwner != self.appDelegate.userId && tableShare.uidFileOwner != self.appDelegate.userId {
|