NCShare.swift 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. //
  2. // NCShare.swift
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 17/07/2019.
  6. // Copyright © 2019 Marino Faggiana. All rights reserved.
  7. //
  8. // Author Marino Faggiana <marino.faggiana@nextcloud.com>
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. import Foundation
  24. import Parchment
  25. import DropDown
  26. class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareLinkCellDelegate, NCShareUserCellDelegate, NCShareNetworkingDelegate {
  27. @IBOutlet weak var viewContainerConstraint: NSLayoutConstraint!
  28. @IBOutlet weak var sharedWithYouByView: UIView!
  29. @IBOutlet weak var sharedWithYouByImage: UIImageView!
  30. @IBOutlet weak var sharedWithYouByLabel: UILabel!
  31. @IBOutlet weak var searchFieldTopConstraint: NSLayoutConstraint!
  32. @IBOutlet weak var searchField: UITextField!
  33. @IBOutlet weak var shareLinkImage: UIImageView!
  34. @IBOutlet weak var shareLinkLabel: UILabel!
  35. @IBOutlet weak var buttonCopy: UIButton!
  36. @IBOutlet weak var buttonMenu: UIButton!
  37. @IBOutlet weak var tableView: UITableView!
  38. private let appDelegate = UIApplication.shared.delegate as! AppDelegate
  39. var metadata: tableMetadata?
  40. public var height: CGFloat = 0
  41. private var shareLinkMenuView: NCShareLinkMenuView?
  42. private var shareUserMenuView: NCShareUserMenuView?
  43. private var shareMenuViewWindow: UIView?
  44. private var dropDown = DropDown()
  45. private var networking: NCShareNetworking?
  46. override func viewDidLoad() {
  47. super.viewDidLoad()
  48. viewContainerConstraint.constant = height
  49. searchFieldTopConstraint.constant = 10
  50. searchField.placeholder = NSLocalizedString("_shareLinksearch_placeholder_", comment: "")
  51. shareLinkLabel.text = NSLocalizedString("_share_link_", comment: "")
  52. shareLinkImage.image = NCShareCommon.sharedInstance.createLinkAvatar()
  53. buttonCopy.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareCopy"), width: 100, height: 100, color: UIColor.gray), for: .normal)
  54. tableView.dataSource = self
  55. tableView.delegate = self
  56. tableView.allowsSelection = false
  57. tableView.register(UINib.init(nibName: "NCShareLinkCell", bundle: nil), forCellReuseIdentifier: "cellLink")
  58. tableView.register(UINib.init(nibName: "NCShareUserCell", bundle: nil), forCellReuseIdentifier: "cellUser")
  59. NotificationCenter.default.addObserver(self, selector: #selector(self.reloadData), name: NSNotification.Name(rawValue: "reloadDataNCShare"), object: nil)
  60. // Shared with you by ...
  61. if metadata!.ownerId != self.appDelegate.activeUserID {
  62. searchFieldTopConstraint.constant = 65
  63. sharedWithYouByView.isHidden = false
  64. sharedWithYouByLabel.text = NSLocalizedString("_shared_with_you_by_", comment: "") + " " + metadata!.ownerDisplayName
  65. let fileNameLocalPath = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(appDelegate.activeUser, activeUrl: appDelegate.activeUrl) + "-" + metadata!.ownerId + ".png"
  66. if FileManager.default.fileExists(atPath: fileNameLocalPath) {
  67. if let image = UIImage(contentsOfFile: fileNameLocalPath) { sharedWithYouByImage.image = image }
  68. } else {
  69. let url = appDelegate.activeUrl + k_avatar + metadata!.ownerId + "/" + k_avatar_size
  70. let encodedString = url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
  71. OCNetworking.sharedManager()?.downloadContents(ofUrl: encodedString, completion: { (data, message, errorCode) in
  72. if errorCode == 0 && UIImage(data: data!) != nil {
  73. do {
  74. try data!.write(to: NSURL(fileURLWithPath: fileNameLocalPath) as URL, options: .atomic)
  75. if let image = UIImage(contentsOfFile: fileNameLocalPath) { self.sharedWithYouByImage.image = image }
  76. } catch { return }
  77. } else {
  78. self.sharedWithYouByImage.image = UIImage(named: "avatar")
  79. }
  80. })
  81. }
  82. }
  83. reloadData()
  84. networking = NCShareNetworking.init(metadata: metadata!, activeUrl: appDelegate.activeUrl, view: self.view, delegate: self)
  85. networking?.readShare()
  86. // changeTheming
  87. NotificationCenter.default.addObserver(self, selector: #selector(self.changeTheming), name: NSNotification.Name(rawValue: "changeTheming"), object: nil)
  88. changeTheming()
  89. }
  90. @objc func changeTheming() {
  91. appDelegate.changeTheming(self, tableView: tableView, collectionView: nil, form: false)
  92. shareLinkLabel.textColor = NCBrandColor.sharedInstance.textView
  93. }
  94. @objc func reloadData() {
  95. let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata!)
  96. if shares.firstShareLink == nil {
  97. buttonMenu.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareAdd"), width: 100, height: 100, color: UIColor.gray), for: .normal)
  98. buttonCopy.isHidden = true
  99. } else {
  100. buttonMenu.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareMenu"), width: 100, height: 100, color: UIColor.gray), for: .normal)
  101. buttonCopy.isHidden = false
  102. }
  103. tableView.reloadData()
  104. }
  105. // MARK: - IBAction
  106. @IBAction func searchFieldDidEndOnExit(textField: UITextField) {
  107. guard let searchString = textField.text else { return }
  108. networking?.getUserAndGroup(searchString: searchString)
  109. }
  110. @IBAction func touchUpInsideButtonCopy(_ sender: Any) {
  111. guard let metadata = self.metadata else { return }
  112. let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata)
  113. tapCopy(with: shares.firstShareLink, sender: sender)
  114. }
  115. @IBAction func touchUpInsideButtonMenu(_ sender: Any) {
  116. guard let metadata = self.metadata else { return }
  117. guard let capabilities = NCManageDatabase.sharedInstance.getCapabilites(account: metadata.account) else { return }
  118. let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata)
  119. if capabilities.isFilesSharingPublicPasswordEnforced && shares.firstShareLink == nil {
  120. let alertController = UIAlertController(title: NSLocalizedString("_enforce_password_protection_", comment: ""), message: "", preferredStyle: .alert)
  121. alertController.addTextField { (textField) in
  122. textField.isSecureTextEntry = true
  123. textField.addTarget(self, action: #selector(self.minCharTextFieldDidChange(sender:)), for: UIControl.Event.editingChanged)
  124. }
  125. alertController.addAction(UIAlertAction(title: NSLocalizedString("_cancel_", comment: ""), style: .default) { (action:UIAlertAction) in })
  126. let okAction = UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default) { (action:UIAlertAction) in
  127. let password = alertController.textFields?.first?.text
  128. self.networking?.share(password: password ?? "", permission: 1, hideDownload: false)
  129. }
  130. okAction.isEnabled = false
  131. alertController.addAction(okAction)
  132. self.present(alertController, animated: true, completion:nil)
  133. } else if shares.firstShareLink == nil {
  134. networking?.share(password: "", permission: 1, hideDownload: false)
  135. } else {
  136. tapMenu(with: shares.firstShareLink!, sender: sender)
  137. }
  138. }
  139. @objc func minCharTextFieldDidChange(sender: UITextField) {
  140. guard let alertController = self.presentedViewController as? UIAlertController else { return }
  141. guard let password = alertController.textFields?.first else { return }
  142. guard let ok = alertController.actions.last else { return }
  143. ok.isEnabled = password.text?.count ?? 0 >= 8
  144. }
  145. @objc func tapLinkMenuViewWindow(gesture: UITapGestureRecognizer) {
  146. shareLinkMenuView?.unLoad()
  147. shareLinkMenuView = nil
  148. shareUserMenuView?.unLoad()
  149. shareUserMenuView = nil
  150. }
  151. func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
  152. return gestureRecognizer.view == touch.view
  153. }
  154. func tapCopy(with tableShare: tableShare?, sender: Any) {
  155. NCShareCommon.sharedInstance.copyLink(tableShare: tableShare, viewController: self)
  156. }
  157. func switchCanEdit(with tableShare: tableShare?, switch: Bool, sender: UISwitch) {
  158. guard let tableShare = tableShare else { return }
  159. guard let metadata = self.metadata else { return }
  160. let canShare = UtilsFramework.isPermission(toCanShare: tableShare.permissions)
  161. var permission: Int = 0
  162. if sender.isOn {
  163. permission = UtilsFramework.getPermissionsValue(byCanEdit: true, andCanCreate: true, andCanChange: true, andCanDelete: true, andCanShare: canShare, andIsFolder: metadata.directory)
  164. } else {
  165. permission = UtilsFramework.getPermissionsValue(byCanEdit: false, andCanCreate: false, andCanChange: false, andCanDelete: false, andCanShare: canShare, andIsFolder: metadata.directory)
  166. }
  167. networking?.updateShare(idRemoteShared: tableShare.idRemoteShared, password: nil, permission: permission, note: nil, expirationTime: nil, hideDownload: tableShare.hideDownload)
  168. }
  169. func tapMenu(with tableShare: tableShare?, sender: Any) {
  170. guard let tableShare = tableShare else { return }
  171. if tableShare.shareType == Int(shareTypeLink.rawValue) {
  172. let views = NCShareCommon.sharedInstance.openViewMenuShareLink(shareViewController: self, tableShare: tableShare, metadata: metadata!)
  173. shareLinkMenuView = views.shareLinkMenuView
  174. shareMenuViewWindow = views.viewWindow
  175. let tap = UITapGestureRecognizer(target: self, action: #selector(tapLinkMenuViewWindow))
  176. tap.delegate = self
  177. shareMenuViewWindow?.addGestureRecognizer(tap)
  178. } else {
  179. let views = NCShareCommon.sharedInstance.openViewMenuUser(shareViewController: self, tableShare: tableShare, metadata: metadata!)
  180. shareUserMenuView = views.shareUserMenuView
  181. shareMenuViewWindow = views.viewWindow
  182. let tap = UITapGestureRecognizer(target: self, action: #selector(tapLinkMenuViewWindow))
  183. tap.delegate = self
  184. shareMenuViewWindow?.addGestureRecognizer(tap)
  185. }
  186. }
  187. /// MARK: - NCShareNetworkingDelegate
  188. func readShareCompleted() {
  189. NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadDataNCShare"), object: nil, userInfo: nil)
  190. }
  191. func shareCompleted() {
  192. NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadDataNCShare"), object: nil, userInfo: nil)
  193. }
  194. func unShareCompleted() { }
  195. func updateShareWithError(idRemoteShared: Int) { }
  196. func getUserAndGroup(items: [OCShareUser]?) {
  197. guard let items = items else { return }
  198. dropDown = DropDown()
  199. let appearance = DropDown.appearance()
  200. appearance.backgroundColor = .white
  201. appearance.cornerRadius = 10
  202. appearance.shadowColor = UIColor(white: 0.5, alpha: 1)
  203. appearance.shadowOpacity = 0.9
  204. appearance.shadowRadius = 25
  205. appearance.animationduration = 0.25
  206. appearance.textColor = .darkGray
  207. if #available(iOS 11.0, *) {
  208. appearance.setupMaskedCorners([.layerMaxXMaxYCorner, .layerMinXMaxYCorner])
  209. }
  210. for item in items {
  211. if item.displayName != nil && item.displayName != "" {
  212. dropDown.dataSource.append(item.displayName)
  213. } else {
  214. dropDown.dataSource.append(item.name)
  215. }
  216. }
  217. dropDown.anchorView = searchField
  218. dropDown.bottomOffset = CGPoint(x: 0, y: searchField.bounds.height)
  219. dropDown.width = searchField.bounds.width
  220. dropDown.direction = .bottom
  221. dropDown.cellNib = UINib(nibName: "NCShareUserDropDownCell", bundle: nil)
  222. dropDown.customCellConfiguration = { (index: Index, item: String, cell: DropDownCell) -> Void in
  223. guard let cell = cell as? NCShareUserDropDownCell else { return }
  224. cell.imageItem.image = UIImage(named: "avatar")
  225. let item = items[index]
  226. let fileNameLocalPath = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(self.appDelegate.activeUser, activeUrl: self.appDelegate.activeUrl) + "-" + item.name + ".png"
  227. if FileManager.default.fileExists(atPath: fileNameLocalPath) {
  228. if let image = UIImage(contentsOfFile: fileNameLocalPath) { cell.imageItem.image = image }
  229. } else {
  230. DispatchQueue.global().async {
  231. let url = self.appDelegate.activeUrl + k_avatar + item.name + "/" + k_avatar_size
  232. let encodedString = url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
  233. OCNetworking.sharedManager()?.downloadContents(ofUrl: encodedString, completion: { (data, message, errorCode) in
  234. if errorCode == 0 && UIImage(data: data!) != nil {
  235. do {
  236. try data!.write(to: NSURL(fileURLWithPath: fileNameLocalPath) as URL, options: .atomic)
  237. if let image = UIImage(contentsOfFile: fileNameLocalPath) { cell.imageItem.image = image }
  238. } catch { return }
  239. } else {
  240. cell.imageItem.image = UIImage(named: "avatar")
  241. }
  242. })
  243. }
  244. }
  245. if item.shareeType == 0 { cell.imageShareeType.image = UIImage(named: "shareTypeUser")} // shareTypeUser
  246. if item.shareeType == 1 { cell.imageShareeType.image = UIImage(named: "shareTypeGroup")} // shareTypeGroup
  247. if item.shareeType == 3 { cell.imageShareeType.image = UIImage(named: "shareTypeLink")} // shareTypeLink
  248. if item.shareeType == 4 { cell.imageShareeType.image = UIImage(named: "shareTypeEmail")} // shareTypeEmail
  249. if item.shareeType == 5 { cell.imageShareeType.image = UIImage(named: "shareTypeUser")} // shareTypeContact
  250. if item.shareeType == 6 { cell.imageShareeType.image = UIImage(named: "shareTypeLink")} // shareTypeRemote
  251. }
  252. dropDown.selectionAction = { [weak self] (index, item) in
  253. let item = items[index]
  254. self!.networking?.shareUserAndGroup(name: item.name, shareeType: item.shareeType, metadata: self!.metadata!)
  255. }
  256. dropDown.show()
  257. }
  258. }
  259. // MARK: - UITableViewDelegate
  260. extension NCShare: UITableViewDelegate {
  261. func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  262. return 60
  263. }
  264. }
  265. // MARK: - UITableViewDataSource
  266. extension NCShare: UITableViewDataSource {
  267. func numberOfSections(in tableView: UITableView) -> Int {
  268. return 1
  269. }
  270. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  271. var numOfRows = 0
  272. let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata!)
  273. if shares.share != nil {
  274. numOfRows = shares.share!.count
  275. }
  276. return numOfRows
  277. }
  278. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  279. let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata!)
  280. let tableShare = shares.share![indexPath.row]
  281. // LINK
  282. if tableShare.shareType == Int(shareTypeLink.rawValue) {
  283. if let cell = tableView.dequeueReusableCell(withIdentifier: "cellLink", for: indexPath) as? NCShareLinkCell {
  284. cell.tableShare = tableShare
  285. cell.delegate = self
  286. cell.labelTitle.text = NSLocalizedString("_share_link_", comment: "")
  287. cell.labelTitle.textColor = NCBrandColor.sharedInstance.textView
  288. return cell
  289. }
  290. } else {
  291. // USER
  292. if let cell = tableView.dequeueReusableCell(withIdentifier: "cellUser", for: indexPath) as? NCShareUserCell {
  293. cell.tableShare = tableShare
  294. cell.delegate = self
  295. cell.labelTitle.text = tableShare.shareWithDisplayName
  296. cell.labelTitle.textColor = NCBrandColor.sharedInstance.textView
  297. cell.labelCanEdit.text = NSLocalizedString("_share_permission_edit_", comment: "")
  298. cell.labelCanEdit.textColor = NCBrandColor.sharedInstance.textView
  299. cell.isUserInteractionEnabled = true
  300. cell.switchCanEdit.isHidden = false
  301. cell.labelCanEdit.isHidden = false
  302. cell.buttonMenu.isHidden = false
  303. let fileNameLocalPath = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(appDelegate.activeUser, activeUrl: appDelegate.activeUrl) + "-" + tableShare.shareWith + ".png"
  304. if FileManager.default.fileExists(atPath: fileNameLocalPath) {
  305. if let image = UIImage(contentsOfFile: fileNameLocalPath) { cell.imageItem.image = image }
  306. } else {
  307. DispatchQueue.global().async {
  308. let url = self.appDelegate.activeUrl + k_avatar + tableShare.shareWith + "/" + k_avatar_size
  309. let encodedString = url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
  310. OCNetworking.sharedManager()?.downloadContents(ofUrl: encodedString, completion: { (data, message, errorCode) in
  311. if errorCode == 0 && UIImage(data: data!) != nil {
  312. do {
  313. try data!.write(to: NSURL(fileURLWithPath: fileNameLocalPath) as URL, options: .atomic)
  314. if let image = UIImage(contentsOfFile: fileNameLocalPath) { cell.imageItem.image = image }
  315. } catch { return }
  316. } else {
  317. cell.imageItem.image = UIImage(named: "avatar")
  318. }
  319. })
  320. }
  321. }
  322. if UtilsFramework.isAnyPermission(toEdit: tableShare.permissions) {
  323. cell.switchCanEdit.setOn(true, animated: false)
  324. } else {
  325. cell.switchCanEdit.setOn(false, animated: false)
  326. }
  327. // If the initiator or the recipient is not the current user, show the list of sharees without any options to edit it.
  328. if tableShare.uidOwner != self.appDelegate.activeUserID && tableShare.uidFileOwner != self.appDelegate.activeUserID {
  329. cell.isUserInteractionEnabled = false
  330. cell.switchCanEdit.isHidden = true
  331. cell.labelCanEdit.isHidden = true
  332. cell.buttonMenu.isHidden = true
  333. }
  334. return cell
  335. }
  336. }
  337. return UITableViewCell()
  338. }
  339. }
  340. // MARK: - NCShareLinkCell
  341. class NCShareLinkCell: UITableViewCell {
  342. @IBOutlet weak var imageItem: UIImageView!
  343. @IBOutlet weak var labelTitle: UILabel!
  344. @IBOutlet weak var buttonCopy: UIButton!
  345. @IBOutlet weak var buttonMenu: UIButton!
  346. private let iconShare: CGFloat = 200
  347. var tableShare: tableShare?
  348. var delegate: NCShareLinkCellDelegate?
  349. override func awakeFromNib() {
  350. super.awakeFromNib()
  351. imageItem.image = NCShareCommon.sharedInstance.createLinkAvatar()
  352. buttonCopy.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareCopy"), width:100, height: 100, color: UIColor.gray), for: .normal)
  353. buttonMenu.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareMenu"), width:100, height: 100, color: UIColor.gray), for: .normal)
  354. }
  355. @IBAction func touchUpInsideCopy(_ sender: Any) {
  356. delegate?.tapCopy(with: tableShare, sender: sender)
  357. }
  358. @IBAction func touchUpInsideMenu(_ sender: Any) {
  359. delegate?.tapMenu(with: tableShare, sender: sender)
  360. }
  361. }
  362. protocol NCShareLinkCellDelegate {
  363. func tapCopy(with tableShare: tableShare?, sender: Any)
  364. func tapMenu(with tableShare: tableShare?, sender: Any)
  365. }
  366. // MARK: - NCShareUserCell
  367. class NCShareUserCell: UITableViewCell {
  368. @IBOutlet weak var imageItem: UIImageView!
  369. @IBOutlet weak var labelTitle: UILabel!
  370. @IBOutlet weak var labelCanEdit: UILabel!
  371. @IBOutlet weak var switchCanEdit: UISwitch!
  372. @IBOutlet weak var buttonMenu: UIButton!
  373. var tableShare: tableShare?
  374. var delegate: NCShareUserCellDelegate?
  375. override func awakeFromNib() {
  376. super.awakeFromNib()
  377. switchCanEdit.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
  378. switchCanEdit.onTintColor = NCBrandColor.sharedInstance.brand
  379. buttonMenu.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareMenu"), width:100, height: 100, color: UIColor.gray), for: .normal)
  380. }
  381. @IBAction func switchCanEditChanged(sender: UISwitch) {
  382. delegate?.switchCanEdit(with: tableShare, switch: sender.isOn, sender: sender)
  383. }
  384. @IBAction func touchUpInsideMenu(_ sender: Any) {
  385. delegate?.tapMenu(with: tableShare, sender: sender)
  386. }
  387. }
  388. protocol NCShareUserCellDelegate {
  389. func switchCanEdit(with tableShare: tableShare?, switch: Bool, sender: UISwitch)
  390. func tapMenu(with tableShare: tableShare?, sender: Any)
  391. }
  392. // MARK: - NCShareUserDropDownCell
  393. class NCShareUserDropDownCell: DropDownCell {
  394. @IBOutlet weak var imageItem: UIImageView!
  395. @IBOutlet weak var imageShareeType: UIImageView!
  396. }