Эх сурвалжийг харах

added status indicator to contactcell

Bastian van de Wetering 6 жил өмнө
parent
commit
2dd495fa33

+ 161 - 158
deltachat-ios/Controller/ChatListController.swift

@@ -9,167 +9,170 @@
 import UIKit
 
 class ChatListController: UIViewController {
-  weak var coordinator: ChatListCoordinator?
-  var chatList: MRChatList?
-
-  lazy var chatTable: UITableView = {
-    let chatTable = UITableView()
-    chatTable.dataSource = self
-    chatTable.delegate = self
-    chatTable.rowHeight = 80
-    return chatTable
-  }()
-
-  var msgChangedObserver: Any?
-  var incomingMsgObserver: Any?
-  var viewChatObserver: Any?
-
-  var newButton: UIBarButtonItem!
-
-  override func viewWillAppear(_ animated: Bool) {
-    super.viewWillAppear(animated)
-
-    if #available(iOS 11.0, *) {
-      // TODO: check if this is really nessesary - dc navigationController has large titles
-      navigationController?.navigationBar.prefersLargeTitles = true
-    }
-
-    getChatList()
-  }
-
-  override func viewWillDisappear(_ animated: Bool) {
-    super.viewWillDisappear(animated)
-    if #available(iOS 11.0, *) {
-      navigationController?.navigationBar.prefersLargeTitles = false
-    }
-  }
-
-  override func viewDidAppear(_ animated: Bool) {
-    super.viewDidAppear(animated)
-    let nc = NotificationCenter.default
-    msgChangedObserver = nc.addObserver(forName: dcNotificationChanged,
-                                        object: nil, queue: nil) {
-      _ in
-      self.getChatList()
-    }
-
-    incomingMsgObserver = nc.addObserver(forName: dcNotificationIncoming,
-                                         object: nil, queue: nil) {
-      _ in
-      self.getChatList()
-    }
-
-    viewChatObserver = nc.addObserver(forName: dcNotificationViewChat, object: nil, queue: nil) {
-      notification in
-      if let chatId = notification.userInfo?["chat_id"] as? Int {
-        self.coordinator?.showChat(chatId: chatId)
-      }
-    }
-  }
-
-  override func viewDidDisappear(_ animated: Bool) {
-    super.viewDidDisappear(animated)
-
-    let nc = NotificationCenter.default
-    if let msgChangedObserver = self.msgChangedObserver {
-      nc.removeObserver(msgChangedObserver)
-    }
-    if let incomingMsgObserver = self.incomingMsgObserver {
-      nc.removeObserver(incomingMsgObserver)
-    }
-    if let viewChatObserver = self.viewChatObserver {
-      nc.removeObserver(viewChatObserver)
-    }
-  }
-
-  override func viewDidLoad() {
-    super.viewDidLoad()
-    title = "Chats"
-    navigationController?.navigationBar.prefersLargeTitles = true
-
-    newButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.compose, target: self, action: #selector(didPressNewChat))
-    newButton.tintColor = DCColors.primary
-    navigationItem.rightBarButtonItem = newButton
-
-    setupChatTable()
-  }
-
-  private func setupChatTable() {
-    view.addSubview(chatTable)
-    chatTable.translatesAutoresizingMaskIntoConstraints = false
-    chatTable.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
-    chatTable.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
-    chatTable.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
-    chatTable.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
-  }
-
-  @objc func didPressNewChat() {
-    coordinator?.showNewChatController()
-  }
-
-  func getChatList() {
-    guard let chatlistPointer = dc_get_chatlist(mailboxPointer, DC_GCL_NO_SPECIALS, nil, 0) else {
-      fatalError("chatlistPointer was nil")
-    }
-    // ownership of chatlistPointer transferred here to ChatList object
-    chatList = MRChatList(chatListPointer: chatlistPointer)
-    chatTable.reloadData()
-  }
+	weak var coordinator: ChatListCoordinator?
+	var chatList: MRChatList?
+
+	lazy var chatTable: UITableView = {
+		let chatTable = UITableView()
+		chatTable.dataSource = self
+		chatTable.delegate = self
+		chatTable.rowHeight = 80
+		return chatTable
+	}()
+
+	var msgChangedObserver: Any?
+	var incomingMsgObserver: Any?
+	var viewChatObserver: Any?
+
+	var newButton: UIBarButtonItem!
+
+	override func viewWillAppear(_ animated: Bool) {
+		super.viewWillAppear(animated)
+
+		if #available(iOS 11.0, *) {
+			// TODO: check if this is really nessesary - dc navigationController has large titles
+			navigationController?.navigationBar.prefersLargeTitles = true
+		}
+
+		getChatList()
+	}
+
+	override func viewWillDisappear(_ animated: Bool) {
+		super.viewWillDisappear(animated)
+		if #available(iOS 11.0, *) {
+			navigationController?.navigationBar.prefersLargeTitles = false
+		}
+	}
+
+	override func viewDidAppear(_ animated: Bool) {
+		super.viewDidAppear(animated)
+		let nc = NotificationCenter.default
+		msgChangedObserver = nc.addObserver(forName: dcNotificationChanged,
+																				object: nil, queue: nil) {
+																					_ in
+																					self.getChatList()
+		}
+
+		incomingMsgObserver = nc.addObserver(forName: dcNotificationIncoming,
+																				 object: nil, queue: nil) {
+																					_ in
+																					self.getChatList()
+		}
+
+		viewChatObserver = nc.addObserver(forName: dcNotificationViewChat, object: nil, queue: nil) {
+			notification in
+			if let chatId = notification.userInfo?["chat_id"] as? Int {
+				self.coordinator?.showChat(chatId: chatId)
+			}
+		}
+	}
+
+	override func viewDidDisappear(_ animated: Bool) {
+		super.viewDidDisappear(animated)
+
+		let nc = NotificationCenter.default
+		if let msgChangedObserver = self.msgChangedObserver {
+			nc.removeObserver(msgChangedObserver)
+		}
+		if let incomingMsgObserver = self.incomingMsgObserver {
+			nc.removeObserver(incomingMsgObserver)
+		}
+		if let viewChatObserver = self.viewChatObserver {
+			nc.removeObserver(viewChatObserver)
+		}
+	}
+
+	override func viewDidLoad() {
+		super.viewDidLoad()
+		title = "Chats"
+		navigationController?.navigationBar.prefersLargeTitles = true
+
+		newButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.compose, target: self, action: #selector(didPressNewChat))
+		newButton.tintColor = DCColors.primary
+		navigationItem.rightBarButtonItem = newButton
+
+		setupChatTable()
+	}
+
+	private func setupChatTable() {
+		view.addSubview(chatTable)
+		chatTable.translatesAutoresizingMaskIntoConstraints = false
+		chatTable.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
+		chatTable.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
+		chatTable.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
+		chatTable.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
+	}
+
+	@objc func didPressNewChat() {
+		coordinator?.showNewChatController()
+	}
+
+	func getChatList() {
+		guard let chatlistPointer = dc_get_chatlist(mailboxPointer, DC_GCL_NO_SPECIALS, nil, 0) else {
+			fatalError("chatlistPointer was nil")
+		}
+		// ownership of chatlistPointer transferred here to ChatList object
+		chatList = MRChatList(chatListPointer: chatlistPointer)
+		chatTable.reloadData()
+	}
 }
 
 extension ChatListController: UITableViewDataSource, UITableViewDelegate {
-  func tableView(_: UITableView, numberOfRowsInSection _: Int) -> Int {
-    guard let chatList = self.chatList else {
-      fatalError("chatList was nil in data source")
-    }
-
-    return chatList.length
-  }
-
-  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-    let row = indexPath.row
-    guard let chatList = self.chatList else {
-      fatalError("chatList was nil in data source")
-    }
-
-    let cell: ContactCell
-    if let c = tableView.dequeueReusableCell(withIdentifier: "ChatCell") as? ContactCell {
-      cell = c
-    } else {
-      cell = ContactCell(style: .default, reuseIdentifier: "ChatCell")
-    }
-
-    let chatId = chatList.getChatId(index: row)
-    let chat = MRChat(id: chatId)
-    let summary = chatList.summary(index: row)
-
-    cell.nameLabel.text = chat.name
-    if let img = chat.profileImage {
-      cell.setImage(img)
-    } else {
-      cell.setBackupImage(name: chat.name, color: chat.color)
-    }
-    cell.setVerified(isVerified: chat.isVerified)
-
-    let result1 = summary.text1 ?? ""
-    let result2 = summary.text2 ?? ""
-    let result: String
-    if !result1.isEmpty, !result2.isEmpty {
-      result = "\(result1): \(result2)"
-    } else {
-      result = "\(result1)\(result2)"
-    }
-
-    cell.emailLabel.text = result
-    return cell
-  }
-
-  func tableView(_: UITableView, didSelectRowAt indexPath: IndexPath) {
-    let row = indexPath.row
-    if let chatId = chatList?.getChatId(index: row) {
-      coordinator?.showChat(chatId: chatId)
-    }
-  }
+	func tableView(_: UITableView, numberOfRowsInSection _: Int) -> Int {
+		guard let chatList = self.chatList else {
+			fatalError("chatList was nil in data source")
+		}
+
+		return chatList.length
+	}
+
+	func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+		let row = indexPath.row
+		guard let chatList = self.chatList else {
+			fatalError("chatList was nil in data source")
+		}
+
+		let cell: ContactCell
+		if let c = tableView.dequeueReusableCell(withIdentifier: "ChatCell") as? ContactCell {
+			cell = c
+		} else {
+			cell = ContactCell(style: .default, reuseIdentifier: "ChatCell")
+		}
+
+		let chatId = chatList.getChatId(index: row)
+		let chat = MRChat(id: chatId)
+		let summary = chatList.summary(index: row)
+
+		cell.nameLabel.text = chat.name
+		if let img = chat.profileImage {
+			cell.setImage(img)
+		} else {
+			cell.setBackupImage(name: chat.name, color: chat.color)
+		}
+		cell.setVerified(isVerified: chat.isVerified)
+
+		let result1 = summary.text1 ?? ""
+		let result2 = summary.text2 ?? ""
+		let result: String
+		if !result1.isEmpty, !result2.isEmpty {
+			result = "\(result1): \(result2)"
+		} else {
+			result = "\(result1)\(result2)"
+		}
+
+		cell.emailLabel.text = result
+		cell.setTimeLabel(summary.timeStamp)
+		cell.setDeliveryStatusIndicator(summary.state)
+
+		return cell
+	}
+
+	func tableView(_: UITableView, didSelectRowAt indexPath: IndexPath) {
+		let row = indexPath.row
+		if let chatId = chatList?.getChatId(index: row) {
+			coordinator?.showChat(chatId: chatId)
+		}
+	}
 
 
 	func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {

+ 143 - 129
deltachat-ios/View/ContactCell.swift

@@ -11,45 +11,53 @@ import UIKit
 // TODO: integrate InitialsBadge in here
 
 
+enum MessageDeliveryState: Int {
+	case UNDEFINED =  0
+	case INNOTICED = 13
+	case INSEEN = 16
+	case OUTPAIRING = 18
+	case OUTPENDING = 20
+	case OUTERROR = 24
+	case OUTDELIVERED = 26
+	case OUTMDNRCVD = 28
+}
 
+class ContactCell: UITableViewCell {
 
+	private let initialsLabelSize: CGFloat = 54
+	private let imgSize: CGFloat = 25
 
+	let avatar: UIView = {
+		let avatar = UIView()
+		return avatar
+	}()
 
-class ContactCell: UITableViewCell {
-  private let initialsLabelSize: CGFloat = 54
-  private let imgSize: CGFloat = 25
-
-  let avatar: UIView = {
-    let avatar = UIView()
-    return avatar
-  }()
-
-  lazy var imgView: UIImageView = {
-    let imgView = UIImageView()
-    let img = UIImage(named: "approval")!.withRenderingMode(.alwaysTemplate)
-    imgView.isHidden = true
-    imgView.image = img
-    imgView.bounds = CGRect(
-      x: 0,
-      y: 0,
-      width: imgSize, height: imgSize
-    )
-    return imgView
-  }()
-
-  lazy var initialsLabel: UILabel = {
-    let initialsLabel = UILabel()
-    initialsLabel.textAlignment = NSTextAlignment.center
-    initialsLabel.textColor = UIColor.white
-    initialsLabel.font = UIFont.systemFont(ofSize: 22)
-    initialsLabel.backgroundColor = UIColor.green
-    let initialsLabelCornerRadius = (initialsLabelSize - 6) / 2
-    initialsLabel.layer.cornerRadius = initialsLabelCornerRadius
-    initialsLabel.clipsToBounds = true
-    return initialsLabel
-  }()
-
-	 let nameLabel: UILabel = {
+	lazy var imgView: UIImageView = {
+		let imgView = UIImageView()
+		let img = UIImage(named: "approval")!.withRenderingMode(.alwaysTemplate)
+		imgView.isHidden = true
+		imgView.image = img
+		imgView.bounds = CGRect(
+			x: 0,
+			y: 0,
+			width: imgSize, height: imgSize
+		)
+		return imgView
+	}()
+
+	lazy var initialsLabel: UILabel = {
+		let initialsLabel = UILabel()
+		initialsLabel.textAlignment = NSTextAlignment.center
+		initialsLabel.textColor = UIColor.white
+		initialsLabel.font = UIFont.systemFont(ofSize: 22)
+		initialsLabel.backgroundColor = UIColor.green
+		let initialsLabelCornerRadius = (initialsLabelSize - 6) / 2
+		initialsLabel.layer.cornerRadius = initialsLabelCornerRadius
+		initialsLabel.clipsToBounds = true
+		return initialsLabel
+	}()
+
+	let nameLabel: UILabel = {
 		let label = UILabel()
 		label.font = UIFont.systemFont(ofSize: 16, weight: .medium)
 		label.lineBreakMode = .byTruncatingTail
@@ -76,63 +84,62 @@ class ContactCell: UITableViewCell {
 		return label
 	}()
 
-	private let statusIndicator: UIImageView = {
-		let image = #imageLiteral(resourceName: "ic_done_36pt").withRenderingMode(.alwaysTemplate)
-		let view = UIImageView(image: image)
+	private let deliveryStatusIndicator: UIImageView = {
+		let view = UIImageView()
 		view.tintColor = UIColor.green
-		view.isHidden = true 
+		view.isHidden = true
 		return view
 	}()
 
 	var darkMode: Bool = false {
-    didSet {
-      if darkMode {
-        contentView.backgroundColor = UIColor.darkGray
-        nameLabel.textColor = UIColor.white
-        emailLabel.textColor = UIColor.white
-      }
-    }
-  }
-
-  override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
-    super.init(style: style, reuseIdentifier: reuseIdentifier)
-    selectionStyle = .none
-    setupSubviews()
-  }
-
-  private func setupSubviews() {
-    let margin: CGFloat = 10
-
-    initialsLabel.translatesAutoresizingMaskIntoConstraints = false
-    avatar.translatesAutoresizingMaskIntoConstraints = false
-    initialsLabel.widthAnchor.constraint(equalToConstant: initialsLabelSize - 6).isActive = true
-    initialsLabel.heightAnchor.constraint(equalToConstant: initialsLabelSize - 6).isActive = true
-    // avatar.backgroundColor = .red
-
-    avatar.widthAnchor.constraint(equalToConstant: initialsLabelSize).isActive = true
-    avatar.heightAnchor.constraint(equalToConstant: initialsLabelSize).isActive = true
-
-    avatar.addSubview(initialsLabel)
-    contentView.addSubview(avatar)
-
-    initialsLabel.topAnchor.constraint(equalTo: avatar.topAnchor, constant: 3).isActive = true
-    initialsLabel.leadingAnchor.constraint(equalTo: avatar.leadingAnchor, constant: 3).isActive = true
-    initialsLabel.trailingAnchor.constraint(equalTo: avatar.trailingAnchor, constant: -3).isActive = true
-
-    avatar.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: margin).isActive = true
-    avatar.center.y = contentView.center.y
-    avatar.center.x += initialsLabelSize / 2
-    avatar.topAnchor.constraint(equalTo: contentView.topAnchor, constant: margin).isActive = true
-    avatar.bottomAnchor.constraint(lessThanOrEqualTo: contentView.bottomAnchor, constant: -margin).isActive = true
-    initialsLabel.center = avatar.center
-
-		statusIndicator.translatesAutoresizingMaskIntoConstraints = false
-		statusIndicator.heightAnchor.constraint(equalToConstant: 25).isActive = true
-		statusIndicator.widthAnchor.constraint(equalToConstant: 25).isActive = true
-
-    let myStackView = UIStackView()
-    myStackView.translatesAutoresizingMaskIntoConstraints = false
-    myStackView.clipsToBounds = true
+		didSet {
+			if darkMode {
+				contentView.backgroundColor = UIColor.darkGray
+				nameLabel.textColor = UIColor.white
+				emailLabel.textColor = UIColor.white
+			}
+		}
+	}
+
+	override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+		super.init(style: style, reuseIdentifier: reuseIdentifier)
+		selectionStyle = .none
+		setupSubviews()
+	}
+
+	private func setupSubviews() {
+		let margin: CGFloat = 10
+
+		initialsLabel.translatesAutoresizingMaskIntoConstraints = false
+		avatar.translatesAutoresizingMaskIntoConstraints = false
+		initialsLabel.widthAnchor.constraint(equalToConstant: initialsLabelSize - 6).isActive = true
+		initialsLabel.heightAnchor.constraint(equalToConstant: initialsLabelSize - 6).isActive = true
+		// avatar.backgroundColor = .red
+
+		avatar.widthAnchor.constraint(equalToConstant: initialsLabelSize).isActive = true
+		avatar.heightAnchor.constraint(equalToConstant: initialsLabelSize).isActive = true
+
+		avatar.addSubview(initialsLabel)
+		contentView.addSubview(avatar)
+
+		initialsLabel.topAnchor.constraint(equalTo: avatar.topAnchor, constant: 3).isActive = true
+		initialsLabel.leadingAnchor.constraint(equalTo: avatar.leadingAnchor, constant: 3).isActive = true
+		initialsLabel.trailingAnchor.constraint(equalTo: avatar.trailingAnchor, constant: -3).isActive = true
+
+		avatar.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: margin).isActive = true
+		avatar.center.y = contentView.center.y
+		avatar.center.x += initialsLabelSize / 2
+		avatar.topAnchor.constraint(equalTo: contentView.topAnchor, constant: margin).isActive = true
+		avatar.bottomAnchor.constraint(lessThanOrEqualTo: contentView.bottomAnchor, constant: -margin).isActive = true
+		initialsLabel.center = avatar.center
+
+		deliveryStatusIndicator.translatesAutoresizingMaskIntoConstraints = false
+		deliveryStatusIndicator.heightAnchor.constraint(equalToConstant: 25).isActive = true
+		deliveryStatusIndicator.widthAnchor.constraint(equalToConstant: 25).isActive = true
+
+		let myStackView = UIStackView()
+		myStackView.translatesAutoresizingMaskIntoConstraints = false
+		myStackView.clipsToBounds = true
 
 		let toplineStackView = UIStackView()
 		toplineStackView.axis = .horizontal
@@ -144,61 +151,68 @@ class ContactCell: UITableViewCell {
 		toplineStackView.addArrangedSubview(timeLabel)
 
 		bottomLineStackView.addArrangedSubview(emailLabel)
-		bottomLineStackView.addArrangedSubview(statusIndicator)
+		bottomLineStackView.addArrangedSubview(deliveryStatusIndicator)
 
-    contentView.addSubview(myStackView)
-    myStackView.leadingAnchor.constraint(equalTo: avatar.trailingAnchor, constant: margin).isActive = true
-    myStackView.centerYAnchor.constraint(equalTo: avatar.centerYAnchor).isActive = true
-    myStackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -margin).isActive = true
-    myStackView.axis = .vertical
-    myStackView.addArrangedSubview(toplineStackView)
-    myStackView.addArrangedSubview(bottomLineStackView)
+		contentView.addSubview(myStackView)
+		myStackView.leadingAnchor.constraint(equalTo: avatar.trailingAnchor, constant: margin).isActive = true
+		myStackView.centerYAnchor.constraint(equalTo: avatar.centerYAnchor).isActive = true
+		myStackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -margin).isActive = true
+		myStackView.axis = .vertical
+		myStackView.addArrangedSubview(toplineStackView)
+		myStackView.addArrangedSubview(bottomLineStackView)
 
-    imgView.tintColor = DCColors.primary
+		imgView.tintColor = DCColors.primary
 
-    avatar.addSubview(imgView)
+		avatar.addSubview(imgView)
 
-    imgView.center.x = avatar.center.x + (avatar.frame.width / 2) + imgSize - 5
-    imgView.center.y = avatar.center.y + (avatar.frame.height / 2) + imgSize - 5
-  }
-
-  func setVerified(isVerified: Bool) {
-    imgView.isHidden = !isVerified
-  }
+		imgView.center.x = avatar.center.x + (avatar.frame.width / 2) + imgSize - 5
+		imgView.center.y = avatar.center.y + (avatar.frame.height / 2) + imgSize - 5
+	}
 
-  func setImage(_ img: UIImage) {
-    let attachment = NSTextAttachment()
-    attachment.image = img
-    initialsLabel.attributedText = NSAttributedString(attachment: attachment)
-  }
+	func setVerified(isVerified: Bool) {
+		imgView.isHidden = !isVerified
+	}
 
-  func setBackupImage(name: String, color: UIColor) {
-    let text = Utils.getInitials(inputName: name)
+	func setImage(_ img: UIImage) {
+		let attachment = NSTextAttachment()
+		attachment.image = img
+		initialsLabel.attributedText = NSAttributedString(attachment: attachment)
+	}
 
-    initialsLabel.textAlignment = .center
-    initialsLabel.text = text
+	func setBackupImage(name: String, color: UIColor) {
+		let text = Utils.getInitials(inputName: name)
 
-    setColor(color)
-  }
+		initialsLabel.textAlignment = .center
+		initialsLabel.text = text
 
-	func setStatusIndicator(show: Bool) {
-		if show { statusIndicator.isHidden = false }
-		else { statusIndicator.isHidden = true }
+		setColor(color)
 	}
 
-	func setTimeLabel(time: String?) {
-		if let time = time {
-			timeLabel.text = time
-		} else {
-			timeLabel.isHidden = true
+	func setDeliveryStatusIndicator(_ status: Int) {
+		guard let status = MessageDeliveryState(rawValue: status) else {
+			return
 		}
+
+		var indicatorImage:UIImage?
+		switch status {
+		case .OUTPENDING, .OUTPAIRING:
+			indicatorImage = #imageLiteral(resourceName: <#T##String#>)
+		case .OUTDELIVERED:
+			indicatorImage = #imageLiteral(resourceName: "ic_done_36pt").withRenderingMode(.alwaysTemplate)
+		default: break
+		}
+		deliveryStatusIndicator.image = indicatorImage
 	}
 
-  func setColor(_ color: UIColor) {
-    initialsLabel.backgroundColor = color
-  }
+	func setTimeLabel(_ timestamp: Int) {
+
+	}
 
-  required init?(coder _: NSCoder) {
-    fatalError("init(coder:) has not been implemented")
-  }
+	func setColor(_ color: UIColor) {
+		initialsLabel.backgroundColor = color
+	}
+
+	required init?(coder _: NSCoder) {
+		fatalError("init(coder:) has not been implemented")
+	}
 }