marinofaggiana 4 years ago
parent
commit
9ce617ff1d

+ 2 - 2
iOSClient/Share/NCShare.swift

@@ -406,7 +406,7 @@ extension NCShare: UITableViewDataSource {
                 let fileNameLocalPath = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(appDelegate.user, urlBase: appDelegate.urlBase) + "-" + tableShare.shareWith + ".png"
                 if FileManager.default.fileExists(atPath: fileNameLocalPath) {
                     if let image = UIImage(contentsOfFile: fileNameLocalPath) {
-                        cell.imageItem.enableAvatar = true
+                        cell.imageItem.disableAvatar = false
                         cell.imageItem.image = image
                     }
                 } else {
@@ -414,7 +414,7 @@ extension NCShare: UITableViewDataSource {
                         NCCommunication.shared.downloadAvatar(userID: tableShare.shareWith, fileNameLocalPath: fileNameLocalPath, size: NCBrandGlobal.shared.avatarSize) { (account, data, errorCode, errorMessage) in
                             if errorCode == 0 && account == self.appDelegate.account && UIImage(data: data!) != nil {
                                 if let image = UIImage(contentsOfFile: fileNameLocalPath) {
-                                    cell.imageItem.enableAvatar = true
+                                    cell.imageItem.disableAvatar = false
                                     cell.imageItem.image = image
                                 }
                             }

+ 1 - 1
iOSClient/Share/NCShareUserCell.xib

@@ -23,7 +23,7 @@
                             <constraint firstAttribute="width" constant="40" id="GNY-Va-SIJ"/>
                         </constraints>
                         <userDefinedRuntimeAttributes>
-                            <userDefinedRuntimeAttribute type="boolean" keyPath="enableAvatar" value="NO"/>
+                            <userDefinedRuntimeAttribute type="boolean" keyPath="disableAvatar" value="YES"/>
                             <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
                                 <integer key="value" value="1"/>
                             </userDefinedRuntimeAttribute>

+ 2 - 2
iOSClient/Utility/NCAvatar.swift

@@ -50,7 +50,7 @@ import Foundation
         }
     }
     
-    @IBInspectable var enableAvatar: Bool = true {
+    @IBInspectable var disableAvatar: Bool = false {
         didSet{
             layoutSubviews()
         }
@@ -74,7 +74,7 @@ import Foundation
     override func layoutSubviews() {
         super.layoutSubviews()
         
-        if !enableAvatar { return }
+        if disableAvatar { return }
         
         layer.cornerRadius = bounds.width / roundness
         layer.borderWidth = borderWidth