|
@@ -97,7 +97,6 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
var timerCheckLink: Timer?
|
|
var timerCheckLink: Timer?
|
|
var timerLongPressLink: Timer?
|
|
var timerLongPressLink: Timer?
|
|
var timerFakeProgress: Timer?
|
|
var timerFakeProgress: Timer?
|
|
- var lastTouchPoint: CGPoint = .zero
|
|
|
|
var showMenuContext = false
|
|
var showMenuContext = false
|
|
var touchedSubview = UIView()
|
|
var touchedSubview = UIView()
|
|
var listViewOnSection: [UIView] = []
|
|
var listViewOnSection: [UIView] = []
|
|
@@ -287,70 +286,55 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
|
|
|
|
private func setRightButtonItem() {
|
|
private func setRightButtonItem() {
|
|
navigationItem.rightBarButtonItems = nil
|
|
navigationItem.rightBarButtonItems = nil
|
|
- var menu = UIMenu(title: "", children: [
|
|
|
|
- UIAction(title: "Search".localized(), handler: {(_) in
|
|
|
|
- self.isSearching = true
|
|
|
|
- if self.reffId != nil {
|
|
|
|
- self.deleteReplyView()
|
|
|
|
- }
|
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) {
|
|
|
|
- let cancelButton = UIBarButtonItem(title: "Cancel".localized(), style: .plain, target: self, action: #selector(self.cancelAction))
|
|
|
|
- cancelButton.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)], for: .normal)
|
|
|
|
- if self.dataPerson["f_pin"] != "-999" && !self.isContactCenter {
|
|
|
|
- self.navigationItem.rightBarButtonItems = nil
|
|
|
|
- }
|
|
|
|
- self.navigationItem.rightBarButtonItem = cancelButton
|
|
|
|
- if self.isContactCenter || self.fromNotification {
|
|
|
|
- self.navigationItem.leftBarButtonItem = nil
|
|
|
|
- }
|
|
|
|
- self.changeAppBar()
|
|
|
|
- self.addMultipleSelectSession()
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
- UIAction(title: "Delete Conversation".localized(), handler: {(_) in
|
|
|
|
- if !self.isContactCenter {
|
|
|
|
- let alert = LibAlertController(title: "", message: "Are you sure to delete all message in this conversation?".localized(), preferredStyle: .alert)
|
|
|
|
- alert.addAction(UIAlertAction(title: "Cancel".localized(), style: UIAlertAction.Style.default, handler: nil))
|
|
|
|
- alert.addAction(UIAlertAction(title: "Delete".localized(), style: .destructive, handler: {(_) in
|
|
|
|
- Database.shared.database?.inTransaction({ (fmdb, rollback) in
|
|
|
|
- _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE", _where: "(f_pin='\(self.dataPerson["f_pin"]!!)' or l_pin='\(self.dataPerson["f_pin"]!!)') and (message_scope_id='3' or message_scope_id='18') and is_call_center = 0")
|
|
|
|
- _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", _where: "l_pin='\(self.dataPerson["f_pin"]!!)'")
|
|
|
|
- let l_pin = self.dataPerson["f_pin"]!!
|
|
|
|
- UserDefaults.standard.removeObject(forKey: "saved_\(l_pin)")
|
|
|
|
- if self.fromNotification {
|
|
|
|
- self.didTapExit()
|
|
|
|
- } else {
|
|
|
|
- self.navigationController?.popViewController(animated: true)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }))
|
|
|
|
- self.present(alert, animated: true, completion: nil)
|
|
|
|
|
|
+ let actionDelete = UIAction(title: "Delete Conversation".localized(), handler: {(_) in
|
|
|
|
+ if !self.isContactCenter {
|
|
|
|
+ let alert = LibAlertController(title: "", message: "Are you sure to delete all message in this conversation?".localized(), preferredStyle: .alert)
|
|
|
|
+ alert.addAction(UIAlertAction(title: "Cancel".localized(), style: UIAlertAction.Style.default, handler: nil))
|
|
|
|
+ alert.addAction(UIAlertAction(title: "Delete".localized(), style: .destructive, handler: {(_) in
|
|
|
|
+ Database.shared.database?.inTransaction({ (fmdb, rollback) in
|
|
|
|
+ _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE", _where: "(f_pin='\(self.dataPerson["f_pin"]!!)' or l_pin='\(self.dataPerson["f_pin"]!!)') and (message_scope_id='3' or message_scope_id='18') and is_call_center = 0")
|
|
|
|
+ _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", _where: "l_pin='\(self.dataPerson["f_pin"]!!)'")
|
|
|
|
+ let l_pin = self.dataPerson["f_pin"]!!
|
|
|
|
+ UserDefaults.standard.removeObject(forKey: "saved_\(l_pin)")
|
|
|
|
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadTabChats"), object: nil, userInfo: nil)
|
|
|
|
+ if self.fromNotification {
|
|
|
|
+ self.didTapExit()
|
|
|
|
+ } else {
|
|
|
|
+ self.navigationController?.popViewController(animated: true)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }))
|
|
|
|
+ self.present(alert, animated: true, completion: nil)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ let actionSearch = UIAction(title: "Search".localized(), handler: {(_) in
|
|
|
|
+ self.isSearching = true
|
|
|
|
+ if self.reffId != nil {
|
|
|
|
+ self.deleteReplyView()
|
|
|
|
+ }
|
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) {
|
|
|
|
+ let cancelButton = UIBarButtonItem(title: "Cancel".localized(), style: .plain, target: self, action: #selector(self.cancelAction))
|
|
|
|
+ cancelButton.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)], for: .normal)
|
|
|
|
+ if self.dataPerson["f_pin"] != "-999" && !self.isContactCenter {
|
|
|
|
+ self.navigationItem.rightBarButtonItems = nil
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ self.navigationItem.rightBarButtonItem = cancelButton
|
|
|
|
+ if self.isContactCenter || self.fromNotification {
|
|
|
|
+ self.navigationItem.leftBarButtonItem = nil
|
|
|
|
+ }
|
|
|
|
+ self.changeAppBar()
|
|
|
|
+ self.addMultipleSelectSession()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ var menu = UIMenu(title: "", children: [
|
|
|
|
+ actionSearch,
|
|
|
|
+ actionDelete
|
|
])
|
|
])
|
|
let exblock = User.getDataCanNil(pin: self.dataPerson["f_pin"]!!)?.ex_block
|
|
let exblock = User.getDataCanNil(pin: self.dataPerson["f_pin"]!!)?.ex_block
|
|
blocking = exblock == nil ? "0" : exblock!.isEmpty ? "0" : exblock!
|
|
blocking = exblock == nil ? "0" : exblock!.isEmpty ? "0" : exblock!
|
|
if blocking == "1" && self.dataPerson["f_pin"]!! != "-999" {
|
|
if blocking == "1" && self.dataPerson["f_pin"]!! != "-999" {
|
|
menu = UIMenu(title: "", children: [
|
|
menu = UIMenu(title: "", children: [
|
|
- UIAction(title: "Search".localized(), handler: {(_) in
|
|
|
|
- self.isSearching = true
|
|
|
|
- if self.reffId != nil {
|
|
|
|
- self.deleteReplyView()
|
|
|
|
- }
|
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) {
|
|
|
|
- let cancelButton = UIBarButtonItem(title: "Cancel".localized(), style: .plain, target: self, action: #selector(self.cancelAction))
|
|
|
|
- cancelButton.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)], for: .normal)
|
|
|
|
- if self.dataPerson["f_pin"] != "-999" && !self.isContactCenter {
|
|
|
|
- self.navigationItem.rightBarButtonItems = nil
|
|
|
|
- }
|
|
|
|
- self.navigationItem.rightBarButtonItem = cancelButton
|
|
|
|
- if self.isContactCenter || self.fromNotification {
|
|
|
|
- self.navigationItem.leftBarButtonItem = nil
|
|
|
|
- }
|
|
|
|
- self.changeAppBar()
|
|
|
|
- self.addMultipleSelectSession()
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
|
|
+ actionSearch,
|
|
UIAction(title: "Unblock".localized(), handler: {(_) in
|
|
UIAction(title: "Unblock".localized(), handler: {(_) in
|
|
if !self.isContactCenter {
|
|
if !self.isContactCenter {
|
|
DispatchQueue.global().async {
|
|
DispatchQueue.global().async {
|
|
@@ -386,48 +370,13 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- UIAction(title: "Delete Conversation".localized(), handler: {(_) in
|
|
|
|
- if !self.isContactCenter {
|
|
|
|
- let alert = LibAlertController(title: "", message: "Are you sure to delete all message in this conversation?".localized(), preferredStyle: .alert)
|
|
|
|
- alert.addAction(UIAlertAction(title: "Cancel".localized(), style: UIAlertAction.Style.default, handler: nil))
|
|
|
|
- alert.addAction(UIAlertAction(title: "Delete".localized(), style: .destructive, handler: {(_) in
|
|
|
|
- Database.shared.database?.inTransaction({ (fmdb, rollback) in
|
|
|
|
- _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE", _where: "(f_pin='\(self.dataPerson["f_pin"]!!)' or l_pin='\(self.dataPerson["f_pin"]!!)') and (message_scope_id='3' or message_scope_id='18') and is_call_center = 0")
|
|
|
|
- _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", _where: "l_pin='\(self.dataPerson["f_pin"]!!)'")
|
|
|
|
- if self.fromNotification {
|
|
|
|
- self.didTapExit()
|
|
|
|
- } else {
|
|
|
|
- self.navigationController?.popViewController(animated: true)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }))
|
|
|
|
- self.present(alert, animated: true, completion: nil)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ actionDelete
|
|
])
|
|
])
|
|
blockedView(blocked: "1")
|
|
blockedView(blocked: "1")
|
|
} else if blocking == "0" {
|
|
} else if blocking == "0" {
|
|
if self.dataPerson["f_pin"]!! != "-999"{
|
|
if self.dataPerson["f_pin"]!! != "-999"{
|
|
menu = UIMenu(title: "", children: [
|
|
menu = UIMenu(title: "", children: [
|
|
- UIAction(title: "Search".localized(), handler: {(_) in
|
|
|
|
- self.isSearching = true
|
|
|
|
- if self.reffId != nil {
|
|
|
|
- self.deleteReplyView()
|
|
|
|
- }
|
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) {
|
|
|
|
- let cancelButton = UIBarButtonItem(title: "Cancel".localized(), style: .plain, target: self, action: #selector(self.cancelAction))
|
|
|
|
- cancelButton.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)], for: .normal)
|
|
|
|
- if self.dataPerson["f_pin"] != "-999" && !self.isContactCenter {
|
|
|
|
- self.navigationItem.rightBarButtonItems = nil
|
|
|
|
- }
|
|
|
|
- self.navigationItem.rightBarButtonItem = cancelButton
|
|
|
|
- if self.isContactCenter || self.fromNotification {
|
|
|
|
- self.navigationItem.leftBarButtonItem = nil
|
|
|
|
- }
|
|
|
|
- self.changeAppBar()
|
|
|
|
- self.addMultipleSelectSession()
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
|
|
+ actionSearch,
|
|
UIAction(title: "Block".localized(), handler: {(_) in
|
|
UIAction(title: "Block".localized(), handler: {(_) in
|
|
if !self.isContactCenter {
|
|
if !self.isContactCenter {
|
|
DispatchQueue.global().async {
|
|
DispatchQueue.global().async {
|
|
@@ -461,64 +410,12 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- UIAction(title: "Delete Conversation".localized(), handler: {(_) in
|
|
|
|
- if !self.isContactCenter {
|
|
|
|
- let alert = LibAlertController(title: "", message: "Are you sure to delete all message in this conversation?".localized(), preferredStyle: .alert)
|
|
|
|
- alert.addAction(UIAlertAction(title: "Cancel".localized(), style: UIAlertAction.Style.default, handler: nil))
|
|
|
|
- alert.addAction(UIAlertAction(title: "Delete".localized(), style: .destructive, handler: {(_) in
|
|
|
|
- Database.shared.database?.inTransaction({ (fmdb, rollback) in
|
|
|
|
- _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", _where: "l_pin='\(self.dataPerson["f_pin"]!!)'")
|
|
|
|
- _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE", _where: "(f_pin='\(self.dataPerson["f_pin"]!!)' or l_pin='\(self.dataPerson["f_pin"]!!)') and (message_scope_id='3' or message_scope_id='18') and is_call_center = 0")
|
|
|
|
- if self.fromNotification {
|
|
|
|
- self.didTapExit()
|
|
|
|
- } else {
|
|
|
|
- self.navigationController?.popViewController(animated: true)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }))
|
|
|
|
- self.present(alert, animated: true, completion: nil)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ actionDelete
|
|
])
|
|
])
|
|
} else {
|
|
} else {
|
|
menu = UIMenu(title: "", children: [
|
|
menu = UIMenu(title: "", children: [
|
|
- UIAction(title: "Search".localized(), handler: {(_) in
|
|
|
|
- self.isSearching = true
|
|
|
|
- if self.reffId != nil {
|
|
|
|
- self.deleteReplyView()
|
|
|
|
- }
|
|
|
|
- DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) {
|
|
|
|
- let cancelButton = UIBarButtonItem(title: "Cancel".localized(), style: .plain, target: self, action: #selector(self.cancelAction))
|
|
|
|
- cancelButton.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)], for: .normal)
|
|
|
|
- if self.dataPerson["f_pin"] != "-999" && !self.isContactCenter {
|
|
|
|
- self.navigationItem.rightBarButtonItems = nil
|
|
|
|
- }
|
|
|
|
- self.navigationItem.rightBarButtonItem = cancelButton
|
|
|
|
- if self.isContactCenter || self.fromNotification {
|
|
|
|
- self.navigationItem.leftBarButtonItem = nil
|
|
|
|
- }
|
|
|
|
- self.changeAppBar()
|
|
|
|
- self.addMultipleSelectSession()
|
|
|
|
- }
|
|
|
|
- }),
|
|
|
|
- UIAction(title: "Delete Conversation".localized(), handler: {(_) in
|
|
|
|
- if !self.isContactCenter {
|
|
|
|
- let alert = LibAlertController(title: "", message: "Are you sure to delete all message in this conversation?".localized(), preferredStyle: .alert)
|
|
|
|
- alert.addAction(UIAlertAction(title: "Cancel".localized(), style: UIAlertAction.Style.default, handler: nil))
|
|
|
|
- alert.addAction(UIAlertAction(title: "Delete".localized(), style: .destructive, handler: {(_) in
|
|
|
|
- Database.shared.database?.inTransaction({ (fmdb, rollback) in
|
|
|
|
- _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE_SUMMARY", _where: "l_pin='\(self.dataPerson["f_pin"]!!)'")
|
|
|
|
- _ = Database.shared.deleteRecord(fmdb: fmdb, table: "MESSAGE", _where: "(f_pin='\(self.dataPerson["f_pin"]!!)' or l_pin='\(self.dataPerson["f_pin"]!!)') and (message_scope_id='3' or message_scope_id='18') and is_call_center = 0")
|
|
|
|
- if self.fromNotification {
|
|
|
|
- self.didTapExit()
|
|
|
|
- } else {
|
|
|
|
- self.navigationController?.popViewController(animated: true)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }))
|
|
|
|
- self.present(alert, animated: true, completion: nil)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ actionSearch,
|
|
|
|
+ actionDelete
|
|
])
|
|
])
|
|
}
|
|
}
|
|
if containerAction.isDescendant(of: self.view) {
|
|
if containerAction.isDescendant(of: self.view) {
|
|
@@ -634,7 +531,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
}
|
|
}
|
|
|
|
|
|
if !last_r.isEmpty {
|
|
if !last_r.isEmpty {
|
|
- reffId = last_r
|
|
|
|
|
|
+ handleReply(indexPath: IndexPath(row: 0, section: 0), reffId: last_r)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
tableChatView.scrollToBottom(isAnimated: false)
|
|
tableChatView.scrollToBottom(isAnimated: false)
|
|
@@ -2449,6 +2346,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
|
|
}
|
|
}
|
|
deleteReplyView()
|
|
deleteReplyView()
|
|
deleteLinkPreview()
|
|
deleteLinkPreview()
|
|
|
|
+ NotificationCenter.default.post(name: NSNotification.Name(rawValue: "reloadTabChats"), object: nil, userInfo: nil)
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
|
|
self.tableChatView.scrollToBottom()
|
|
self.tableChatView.scrollToBottom()
|
|
if self.markerCounter != nil {
|
|
if self.markerCounter != nil {
|
|
@@ -6140,15 +6038,17 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
guard let text = label.text else { return nil }
|
|
guard let text = label.text else { return nil }
|
|
|
|
|
|
let layoutManager = NSLayoutManager()
|
|
let layoutManager = NSLayoutManager()
|
|
- let textContainer = NSTextContainer(size: label.frame.size)
|
|
|
|
- let textStorage = NSTextStorage(attributedString: NSAttributedString(string: text))
|
|
|
|
|
|
+ let textContainer = NSTextContainer(size: .zero)
|
|
|
|
+ let textStorage = NSTextStorage(attributedString: label.attributedText ?? NSAttributedString())
|
|
|
|
|
|
layoutManager.addTextContainer(textContainer)
|
|
layoutManager.addTextContainer(textContainer)
|
|
textStorage.addLayoutManager(layoutManager)
|
|
textStorage.addLayoutManager(layoutManager)
|
|
- textContainer.lineFragmentPadding = 0
|
|
|
|
|
|
+
|
|
|
|
+ textContainer.lineFragmentPadding = 0.0
|
|
|
|
+ textContainer.lineBreakMode = label.lineBreakMode
|
|
textContainer.maximumNumberOfLines = label.numberOfLines
|
|
textContainer.maximumNumberOfLines = label.numberOfLines
|
|
|
|
+ textContainer.size = label.bounds.size
|
|
|
|
|
|
- lastTouchPoint = point
|
|
|
|
let characterIndex = layoutManager.characterIndex(for: point, in: textContainer, fractionOfDistanceBetweenInsertionPoints: nil)
|
|
let characterIndex = layoutManager.characterIndex(for: point, in: textContainer, fractionOfDistanceBetweenInsertionPoints: nil)
|
|
|
|
|
|
if characterIndex == text.count - 1 {
|
|
if characterIndex == text.count - 1 {
|
|
@@ -6182,8 +6082,8 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
}
|
|
}
|
|
|
|
|
|
@objc func tapMessageText(_ sender: ObjectGesture) {
|
|
@objc func tapMessageText(_ sender: ObjectGesture) {
|
|
- var stringURl = sender.message_id.lowercased()
|
|
|
|
- if stringURl.starts(with: "www.") {
|
|
|
|
|
|
+ var stringURl = sender.message_id
|
|
|
|
+ if stringURl.lowercased().starts(with: "www.") {
|
|
stringURl = "https://" + stringURl.replacingOccurrences(of: "www.", with: "")
|
|
stringURl = "https://" + stringURl.replacingOccurrences(of: "www.", with: "")
|
|
}
|
|
}
|
|
guard let url = URL(string: stringURl) else { return }
|
|
guard let url = URL(string: stringURl) else { return }
|
|
@@ -6218,15 +6118,20 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
|
|
// return UISwipeActionsConfiguration(actions: [action])
|
|
// return UISwipeActionsConfiguration(actions: [action])
|
|
// }
|
|
// }
|
|
|
|
|
|
- private func handleReply(indexPath: IndexPath, dataMessagesImage: [String: Any?] = [:]) {
|
|
|
|
- self.deleteReplyView()
|
|
|
|
|
|
+ private func handleReply(indexPath: IndexPath, dataMessagesImage: [String: Any?] = [:], reffId: String = "") {
|
|
var dataMessages = self.dataMessages.filter({ $0["chat_date"] as! String == dataDates[indexPath.section]})
|
|
var dataMessages = self.dataMessages.filter({ $0["chat_date"] as! String == dataDates[indexPath.section]})
|
|
- if dataMessagesImage.count != 0 {
|
|
|
|
- dataMessages = [dataMessagesImage]
|
|
|
|
|
|
+ if reffId.isEmpty {
|
|
|
|
+ self.deleteReplyView()
|
|
|
|
+ if dataMessagesImage.count != 0 {
|
|
|
|
+ dataMessages = [dataMessagesImage]
|
|
|
|
+ } else {
|
|
|
|
+ self.textFieldSend.becomeFirstResponder()
|
|
|
|
+ }
|
|
|
|
+ self.reffId = dataMessages[indexPath.row]["message_id"] as? String
|
|
} else {
|
|
} else {
|
|
- self.textFieldSend.becomeFirstResponder()
|
|
|
|
|
|
+ dataMessages = self.dataMessages.filter({ $0["message_id"] as! String == reffId })
|
|
|
|
+ self.reffId = reffId
|
|
}
|
|
}
|
|
- self.reffId = dataMessages[indexPath.row]["message_id"] as? String
|
|
|
|
UIView.animate(withDuration: 0.25, delay: 0.0, options: .curveEaseInOut, animations: {
|
|
UIView.animate(withDuration: 0.25, delay: 0.0, options: .curveEaseInOut, animations: {
|
|
self.constraintTopTextField.constant = self.constraintTopTextField.constant + 50
|
|
self.constraintTopTextField.constant = self.constraintTopTextField.constant + 50
|
|
}, completion: nil)
|
|
}, completion: nil)
|