Browse Source

new share view

marinofaggiana 5 years ago
parent
commit
ef1a8059ad
2 changed files with 5 additions and 0 deletions
  1. 1 0
      iOSClient/Share/NCShare.swift
  2. 4 0
      iOSClient/Share/NCShareCommon.swift

+ 1 - 0
iOSClient/Share/NCShare.swift

@@ -217,6 +217,7 @@ class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareLinkCellDel
         dropDown.cellNib = UINib(nibName: "NCShareUserDropDownCell", bundle: nil)
         dropDown.customCellConfiguration = { (index: Index, item: String, cell: DropDownCell) -> Void in
             guard let cell = cell as? NCShareUserDropDownCell else { return }
+            cell.imageItem.image = UIImage(named: "avatar")
             let item = items[index]
             NCShareCommon.sharedInstance.downloadAvatar(user: item.name, cell: cell)
             if item.shareeType == 0 { cell.imageShareeType.image = UIImage(named: "shareTypeUser")}     // shareTypeUser

+ 4 - 0
iOSClient/Share/NCShareCommon.swift

@@ -64,6 +64,8 @@ class NCShareCommon: NSObject {
                             try data!.write(to: NSURL(fileURLWithPath: fileNameLocalPath) as URL, options: .atomic)
                         } catch { return }
                         cell.imageItem.image = UIImage(data: data!)
+                    } else {
+                        cell.imageItem.image = UIImage(named: "avatar")
                     }
                 })
             }
@@ -89,6 +91,8 @@ class NCShareCommon: NSObject {
                             try data!.write(to: NSURL(fileURLWithPath: fileNameLocalPath) as URL, options: .atomic)
                         } catch { return }
                         cell.imageItem.image = UIImage(data: data!)
+                    } else {
+                        cell.imageItem.image = UIImage(named: "avatar")
                     }
                 })
             }