NCShare.swift 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  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. import NCCommunication
  27. class NCShare: UIViewController, UIGestureRecognizerDelegate, NCShareLinkCellDelegate, NCShareUserCellDelegate, NCShareNetworkingDelegate {
  28. @IBOutlet weak var viewContainerConstraint: NSLayoutConstraint!
  29. @IBOutlet weak var sharedWithYouByView: UIView!
  30. @IBOutlet weak var sharedWithYouByImage: UIImageView!
  31. @IBOutlet weak var sharedWithYouByLabel: UILabel!
  32. @IBOutlet weak var searchFieldTopConstraint: NSLayoutConstraint!
  33. @IBOutlet weak var searchField: UITextField!
  34. @IBOutlet weak var shareLinkImage: UIImageView!
  35. @IBOutlet weak var shareLinkLabel: UILabel!
  36. @IBOutlet weak var shareInternalLinkImage: UIImageView!
  37. @IBOutlet weak var shareInternalLinkLabel: UILabel!
  38. @IBOutlet weak var buttonInternalCopy: UIButton!
  39. @IBOutlet weak var buttonCopy: UIButton!
  40. @IBOutlet weak var buttonMenu: UIButton!
  41. @IBOutlet weak var tableView: UITableView!
  42. private let appDelegate = UIApplication.shared.delegate as! AppDelegate
  43. var metadata: tableMetadata?
  44. public var height: CGFloat = 0
  45. private var shareLinkMenuView: NCShareLinkMenuView?
  46. private var shareUserMenuView: NCShareUserMenuView?
  47. private var shareMenuViewWindow: UIView?
  48. private var dropDown = DropDown()
  49. private var networking: NCShareNetworking?
  50. override func viewDidLoad() {
  51. super.viewDidLoad()
  52. viewContainerConstraint.constant = height
  53. searchFieldTopConstraint.constant = 10
  54. searchField.placeholder = NSLocalizedString("_shareLinksearch_placeholder_", comment: "")
  55. shareLinkImage.image = NCShareCommon.sharedInstance.createLinkAvatar(imageName: "sharebylink", colorCircle: NCBrandColor.sharedInstance.brandElement)
  56. shareLinkLabel.text = NSLocalizedString("_share_link_", comment: "")
  57. buttonCopy.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareCopy"), width: 100, height: 100, color: .gray), for: .normal)
  58. shareInternalLinkImage.image = NCShareCommon.sharedInstance.createLinkAvatar(imageName: "shareInternalLink", colorCircle: .gray)
  59. shareInternalLinkLabel.text = NSLocalizedString("_share_internal_link_", comment: "")
  60. buttonInternalCopy.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareCopy"), width: 100, height: 100, color: .gray), for: .normal)
  61. tableView.dataSource = self
  62. tableView.delegate = self
  63. tableView.allowsSelection = false
  64. tableView.register(UINib.init(nibName: "NCShareLinkCell", bundle: nil), forCellReuseIdentifier: "cellLink")
  65. tableView.register(UINib.init(nibName: "NCShareUserCell", bundle: nil), forCellReuseIdentifier: "cellUser")
  66. NotificationCenter.default.addObserver(self, selector: #selector(reloadData), name: NSNotification.Name(rawValue: k_notificationCenter_reloadDataNCShare), object: nil)
  67. // Shared with you by ...
  68. if metadata!.ownerId != self.appDelegate.userID {
  69. searchFieldTopConstraint.constant = 65
  70. sharedWithYouByView.isHidden = false
  71. sharedWithYouByLabel.text = NSLocalizedString("_shared_with_you_by_", comment: "") + " " + metadata!.ownerDisplayName
  72. let fileNameLocalPath = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(appDelegate.user, urlBase: appDelegate.urlBase) + "-" + metadata!.ownerId + ".png"
  73. if FileManager.default.fileExists(atPath: fileNameLocalPath) {
  74. if let image = UIImage(contentsOfFile: fileNameLocalPath) { sharedWithYouByImage.image = image }
  75. } else {
  76. NCCommunication.shared.downloadAvatar(userID: metadata!.ownerId, fileNameLocalPath: fileNameLocalPath, size: Int(k_avatar_size)) { (account, data, errorCode, errorMessage) in
  77. if errorCode == 0 && account == self.appDelegate.account && UIImage(data: data!) != nil {
  78. if let image = UIImage(contentsOfFile: fileNameLocalPath) {
  79. self.sharedWithYouByImage.image = image
  80. }
  81. } else {
  82. self.sharedWithYouByImage.image = UIImage(named: "avatar")
  83. }
  84. }
  85. }
  86. }
  87. reloadData()
  88. networking = NCShareNetworking.init(metadata: metadata!, urlBase: appDelegate.urlBase, view: self.view, delegate: self)
  89. networking?.readShare()
  90. // changeTheming
  91. NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: k_notificationCenter_changeTheming), object: nil)
  92. changeTheming()
  93. }
  94. @objc func changeTheming() {
  95. view.backgroundColor = NCBrandColor.sharedInstance.backgroundForm
  96. tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundForm
  97. tableView.reloadData()
  98. shareLinkLabel.textColor = NCBrandColor.sharedInstance.textView
  99. }
  100. @objc func reloadData() {
  101. let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata!)
  102. if shares.firstShareLink == nil {
  103. buttonMenu.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareAdd"), width: 100, height: 100, color: UIColor.gray), for: .normal)
  104. buttonCopy.isHidden = true
  105. } else {
  106. buttonMenu.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareMenu"), width: 100, height: 100, color: UIColor.gray), for: .normal)
  107. buttonCopy.isHidden = false
  108. }
  109. tableView.reloadData()
  110. }
  111. // MARK: - IBAction
  112. @IBAction func searchFieldDidEndOnExit(textField: UITextField) {
  113. guard let searchString = textField.text else { return }
  114. networking?.getSharees(searchString: searchString)
  115. }
  116. @IBAction func touchUpInsideButtonCopy(_ sender: Any) {
  117. guard let metadata = self.metadata else { return }
  118. let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata)
  119. tapCopy(with: shares.firstShareLink, sender: sender)
  120. }
  121. @IBAction func touchUpInsideButtonCopyInernalLink(_ sender: Any) {
  122. guard let metadata = self.metadata else { return }
  123. let serverUrlFileName = metadata.serverUrl + "/" + metadata.fileName
  124. NCNetworking.shared.readFile(serverUrlFileName: serverUrlFileName, account: metadata.account) { (account, metadata, errorCode, errorDescription) in
  125. if errorCode == 0 && metadata != nil {
  126. let internalLink = self.appDelegate.urlBase + "/index.php/f/" + metadata!.fileId
  127. NCShareCommon.sharedInstance.copyLink(link: internalLink, viewController: self, sender: sender)
  128. } else {
  129. NCContentPresenter.shared.messageNotification("_share_", description: errorDescription, delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.error, errorCode: errorCode)
  130. }
  131. }
  132. }
  133. @IBAction func touchUpInsideButtonMenu(_ sender: Any) {
  134. guard let metadata = self.metadata else { return }
  135. let isFilesSharingPublicPasswordEnforced = NCManageDatabase.sharedInstance.getCapabilitiesServerBool(account: metadata.account, elements: NCElementsJSON.shared.capabilitiesFileSharingPubPasswdEnforced, exists: false)
  136. let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata)
  137. if isFilesSharingPublicPasswordEnforced && shares.firstShareLink == nil {
  138. let alertController = UIAlertController(title: NSLocalizedString("_enforce_password_protection_", comment: ""), message: "", preferredStyle: .alert)
  139. alertController.addTextField { (textField) in
  140. textField.isSecureTextEntry = true
  141. }
  142. alertController.addAction(UIAlertAction(title: NSLocalizedString("_cancel_", comment: ""), style: .default) { (action:UIAlertAction) in })
  143. let okAction = UIAlertAction(title: NSLocalizedString("_ok_", comment: ""), style: .default) { (action:UIAlertAction) in
  144. let password = alertController.textFields?.first?.text
  145. self.networking?.createShareLink(password: password ?? "")
  146. }
  147. alertController.addAction(okAction)
  148. self.present(alertController, animated: true, completion:nil)
  149. } else if shares.firstShareLink == nil {
  150. networking?.createShareLink(password: "")
  151. } else {
  152. tapMenu(with: shares.firstShareLink!, sender: sender)
  153. }
  154. }
  155. @objc func tapLinkMenuViewWindow(gesture: UITapGestureRecognizer) {
  156. shareLinkMenuView?.unLoad()
  157. shareLinkMenuView = nil
  158. shareUserMenuView?.unLoad()
  159. shareUserMenuView = nil
  160. }
  161. func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
  162. return gestureRecognizer.view == touch.view
  163. }
  164. func tapCopy(with tableShare: tableShare?, sender: Any) {
  165. if let link = tableShare?.url {
  166. NCShareCommon.sharedInstance.copyLink(link: link, viewController: self, sender: sender)
  167. }
  168. }
  169. func switchCanEdit(with tableShare: tableShare?, switch: Bool, sender: UISwitch) {
  170. guard let tableShare = tableShare else { return }
  171. guard let metadata = self.metadata else { return }
  172. let canShare = CCUtility.isPermission(toCanShare: tableShare.permissions)
  173. var permission: Int = 0
  174. if sender.isOn {
  175. permission = CCUtility.getPermissionsValue(byCanEdit: true, andCanCreate: true, andCanChange: true, andCanDelete: true, andCanShare: canShare, andIsFolder: metadata.directory)
  176. } else {
  177. permission = CCUtility.getPermissionsValue(byCanEdit: false, andCanCreate: false, andCanChange: false, andCanDelete: false, andCanShare: canShare, andIsFolder: metadata.directory)
  178. }
  179. networking?.updateShare(idShare: tableShare.idShare, password: nil, permission: permission, note: nil, expirationDate: nil, hideDownload: tableShare.hideDownload)
  180. }
  181. func tapMenu(with tableShare: tableShare?, sender: Any) {
  182. guard let tableShare = tableShare else { return }
  183. if tableShare.shareType == 3 {
  184. let views = NCShareCommon.sharedInstance.openViewMenuShareLink(shareViewController: self, tableShare: tableShare, metadata: metadata!)
  185. shareLinkMenuView = views.shareLinkMenuView
  186. shareMenuViewWindow = views.viewWindow
  187. let tap = UITapGestureRecognizer(target: self, action: #selector(tapLinkMenuViewWindow))
  188. tap.delegate = self
  189. shareMenuViewWindow?.addGestureRecognizer(tap)
  190. } else {
  191. let views = NCShareCommon.sharedInstance.openViewMenuUser(shareViewController: self, tableShare: tableShare, metadata: metadata!)
  192. shareUserMenuView = views.shareUserMenuView
  193. shareMenuViewWindow = views.viewWindow
  194. let tap = UITapGestureRecognizer(target: self, action: #selector(tapLinkMenuViewWindow))
  195. tap.delegate = self
  196. shareMenuViewWindow?.addGestureRecognizer(tap)
  197. }
  198. }
  199. /// MARK: - NCShareNetworkingDelegate
  200. func readShareCompleted() {
  201. NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataNCShare)
  202. }
  203. func shareCompleted() {
  204. NotificationCenter.default.postOnMainThread(name: k_notificationCenter_reloadDataNCShare)
  205. }
  206. func unShareCompleted() { }
  207. func updateShareWithError(idShare: Int) { }
  208. func getSharees(sharees: [NCCommunicationSharee]?) {
  209. guard let sharees = sharees else { return }
  210. dropDown = DropDown()
  211. let appearance = DropDown.appearance()
  212. appearance.backgroundColor = .white
  213. appearance.cornerRadius = 10
  214. appearance.shadowColor = UIColor(white: 0.5, alpha: 1)
  215. appearance.shadowOpacity = 0.9
  216. appearance.shadowRadius = 25
  217. appearance.animationduration = 0.25
  218. appearance.textColor = .darkGray
  219. appearance.setupMaskedCorners([.layerMaxXMaxYCorner, .layerMinXMaxYCorner])
  220. for sharee in sharees {
  221. var label = sharee.label
  222. if sharee.shareType == NCShareCommon.sharedInstance.SHARE_TYPE_CIRCLE {
  223. label = label + " (" + sharee.circleInfo + ", " + sharee.circleOwner + ")"
  224. }
  225. dropDown.dataSource.append(label)
  226. }
  227. dropDown.anchorView = searchField
  228. dropDown.bottomOffset = CGPoint(x: 0, y: searchField.bounds.height)
  229. dropDown.width = searchField.bounds.width
  230. dropDown.direction = .bottom
  231. dropDown.cellNib = UINib(nibName: "NCShareUserDropDownCell", bundle: nil)
  232. dropDown.customCellConfiguration = { (index: Index, item: String, cell: DropDownCell) -> Void in
  233. guard let cell = cell as? NCShareUserDropDownCell else { return }
  234. let sharee = sharees[index]
  235. cell.imageItem.image = NCShareCommon.sharedInstance.getImageShareType(shareType: sharee.shareType)
  236. let fileNameLocalPath = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(self.appDelegate.user, urlBase: self.appDelegate.urlBase) + "-" + sharee.label + ".png"
  237. if FileManager.default.fileExists(atPath: fileNameLocalPath) {
  238. if let image = UIImage(contentsOfFile: fileNameLocalPath) { cell.imageItem.image = image }
  239. } else {
  240. DispatchQueue.global().async {
  241. NCCommunication.shared.downloadAvatar(userID: sharee.shareWith, fileNameLocalPath: fileNameLocalPath, size: Int(k_avatar_size)) { (account, data, errorCode, errorMessage) in
  242. if errorCode == 0 && account == self.appDelegate.account && UIImage(data: data!) != nil {
  243. if let image = UIImage(contentsOfFile: fileNameLocalPath) {
  244. DispatchQueue.main.async {
  245. cell.imageItem.image = image
  246. }
  247. }
  248. }
  249. }
  250. }
  251. }
  252. cell.imageShareeType.image = NCShareCommon.sharedInstance.getImageShareType(shareType: sharee.shareType)
  253. }
  254. dropDown.selectionAction = { [weak self] (index, item) in
  255. let sharee = sharees[index]
  256. self!.networking?.createShare(shareWith: sharee.shareWith, shareType: sharee.shareType, metadata: self!.metadata!)
  257. }
  258. dropDown.show()
  259. }
  260. }
  261. // MARK: - UITableViewDelegate
  262. extension NCShare: UITableViewDelegate {
  263. func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  264. return 60
  265. }
  266. }
  267. // MARK: - UITableViewDataSource
  268. extension NCShare: UITableViewDataSource {
  269. func numberOfSections(in tableView: UITableView) -> Int {
  270. return 1
  271. }
  272. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  273. var numOfRows = 0
  274. let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata!)
  275. if shares.share != nil {
  276. numOfRows = shares.share!.count
  277. }
  278. return numOfRows
  279. }
  280. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  281. let shares = NCManageDatabase.sharedInstance.getTableShares(metadata: metadata!)
  282. let tableShare = shares.share![indexPath.row]
  283. // LINK
  284. if tableShare.shareType == 3 {
  285. if let cell = tableView.dequeueReusableCell(withIdentifier: "cellLink", for: indexPath) as? NCShareLinkCell {
  286. cell.tableShare = tableShare
  287. cell.delegate = self
  288. cell.labelTitle.text = NSLocalizedString("_share_link_", comment: "")
  289. cell.labelTitle.textColor = NCBrandColor.sharedInstance.textView
  290. return cell
  291. }
  292. } else {
  293. // USER
  294. if let cell = tableView.dequeueReusableCell(withIdentifier: "cellUser", for: indexPath) as? NCShareUserCell {
  295. cell.tableShare = tableShare
  296. cell.delegate = self
  297. cell.labelTitle.text = tableShare.shareWithDisplayname
  298. cell.labelTitle.textColor = NCBrandColor.sharedInstance.textView
  299. cell.labelCanEdit.text = NSLocalizedString("_share_permission_edit_", comment: "")
  300. cell.labelCanEdit.textColor = NCBrandColor.sharedInstance.textView
  301. cell.isUserInteractionEnabled = true
  302. cell.switchCanEdit.isHidden = false
  303. cell.labelCanEdit.isHidden = false
  304. cell.buttonMenu.isHidden = false
  305. cell.imageItem.image = NCShareCommon.sharedInstance.getImageShareType(shareType: tableShare.shareType)
  306. let fileNameLocalPath = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(appDelegate.user, urlBase: appDelegate.urlBase) + "-" + tableShare.shareWith + ".png"
  307. if FileManager.default.fileExists(atPath: fileNameLocalPath) {
  308. if let image = UIImage(contentsOfFile: fileNameLocalPath) { cell.imageItem.image = image }
  309. } else {
  310. DispatchQueue.global().async {
  311. NCCommunication.shared.downloadAvatar(userID: tableShare.shareWith, fileNameLocalPath: fileNameLocalPath, size: Int(k_avatar_size)) { (account, data, errorCode, errorMessage) in
  312. if errorCode == 0 && account == self.appDelegate.account && UIImage(data: data!) != nil {
  313. if let image = UIImage(contentsOfFile: fileNameLocalPath) {
  314. cell.imageItem.image = image
  315. }
  316. }
  317. }
  318. }
  319. }
  320. if CCUtility.isAnyPermission(toEdit: tableShare.permissions) {
  321. cell.switchCanEdit.setOn(true, animated: false)
  322. } else {
  323. cell.switchCanEdit.setOn(false, animated: false)
  324. }
  325. // If the initiator or the recipient is not the current user, show the list of sharees without any options to edit it.
  326. if tableShare.uidOwner != self.appDelegate.userID && tableShare.uidFileOwner != self.appDelegate.userID {
  327. cell.isUserInteractionEnabled = false
  328. cell.switchCanEdit.isHidden = true
  329. cell.labelCanEdit.isHidden = true
  330. cell.buttonMenu.isHidden = true
  331. }
  332. return cell
  333. }
  334. }
  335. return UITableViewCell()
  336. }
  337. }
  338. // MARK: - NCShareLinkCell
  339. class NCShareLinkCell: UITableViewCell {
  340. @IBOutlet weak var imageItem: UIImageView!
  341. @IBOutlet weak var labelTitle: UILabel!
  342. @IBOutlet weak var buttonCopy: UIButton!
  343. @IBOutlet weak var buttonMenu: UIButton!
  344. private let iconShare: CGFloat = 200
  345. var tableShare: tableShare?
  346. var delegate: NCShareLinkCellDelegate?
  347. override func awakeFromNib() {
  348. super.awakeFromNib()
  349. imageItem.image = NCShareCommon.sharedInstance.createLinkAvatar(imageName: "sharebylink", colorCircle: NCBrandColor.sharedInstance.brandElement)
  350. buttonCopy.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareCopy"), width:100, height: 100, color: UIColor.gray), for: .normal)
  351. buttonMenu.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareMenu"), width:100, height: 100, color: UIColor.gray), for: .normal)
  352. }
  353. @IBAction func touchUpInsideCopy(_ sender: Any) {
  354. delegate?.tapCopy(with: tableShare, sender: sender)
  355. }
  356. @IBAction func touchUpInsideMenu(_ sender: Any) {
  357. delegate?.tapMenu(with: tableShare, sender: sender)
  358. }
  359. }
  360. protocol NCShareLinkCellDelegate {
  361. func tapCopy(with tableShare: tableShare?, sender: Any)
  362. func tapMenu(with tableShare: tableShare?, sender: Any)
  363. }
  364. // MARK: - NCShareUserCell
  365. class NCShareUserCell: UITableViewCell {
  366. @IBOutlet weak var imageItem: UIImageView!
  367. @IBOutlet weak var labelTitle: UILabel!
  368. @IBOutlet weak var labelCanEdit: UILabel!
  369. @IBOutlet weak var switchCanEdit: UISwitch!
  370. @IBOutlet weak var buttonMenu: UIButton!
  371. var tableShare: tableShare?
  372. var delegate: NCShareUserCellDelegate?
  373. override func awakeFromNib() {
  374. super.awakeFromNib()
  375. switchCanEdit.transform = CGAffineTransform(scaleX: 0.75, y: 0.75)
  376. switchCanEdit.onTintColor = NCBrandColor.sharedInstance.brandElement
  377. buttonMenu.setImage(CCGraphics.changeThemingColorImage(UIImage.init(named: "shareMenu"), width:100, height: 100, color: UIColor.gray), for: .normal)
  378. }
  379. @IBAction func switchCanEditChanged(sender: UISwitch) {
  380. delegate?.switchCanEdit(with: tableShare, switch: sender.isOn, sender: sender)
  381. }
  382. @IBAction func touchUpInsideMenu(_ sender: Any) {
  383. delegate?.tapMenu(with: tableShare, sender: sender)
  384. }
  385. }
  386. protocol NCShareUserCellDelegate {
  387. func switchCanEdit(with tableShare: tableShare?, switch: Bool, sender: UISwitch)
  388. func tapMenu(with tableShare: tableShare?, sender: Any)
  389. }
  390. // MARK: - NCShareUserDropDownCell
  391. class NCShareUserDropDownCell: DropDownCell {
  392. @IBOutlet weak var imageItem: UIImageView!
  393. @IBOutlet weak var imageShareeType: UIImageView!
  394. }