|
@@ -33,13 +33,6 @@ class ContactProfileViewController: UITableViewController {
|
|
|
tableView.reloadData()
|
|
|
}
|
|
|
|
|
|
- override func viewDidLoad() {
|
|
|
- super.viewDidLoad()
|
|
|
- let dotsImage:UIImage = #imageLiteral(resourceName: "ic_more_vert")
|
|
|
- let dotsButton = UIBarButtonItem(image: dotsImage, landscapeImagePhone: nil, style: .plain, target: self, action: #selector(didPressDotsButton))
|
|
|
- // self.navigationItem.rightBarButtonItem = dotsButton
|
|
|
- }
|
|
|
-
|
|
|
func displayNewChat(contactId: Int) {
|
|
|
let chatId = dc_create_chat_by_contact_id(mailboxPointer, UInt32(contactId))
|
|
|
let chatVC = ChatViewController(chatId: Int(chatId))
|
|
@@ -48,25 +41,6 @@ class ContactProfileViewController: UITableViewController {
|
|
|
self.navigationController?.pushViewController(chatVC, animated: true)
|
|
|
}
|
|
|
|
|
|
- @objc func didPressDotsButton() {
|
|
|
- print("pressed")
|
|
|
- let actionSheet = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
|
|
|
- actionSheet.addAction(UIAlertAction(title: "Copy to clipboard",
|
|
|
- style: .default,
|
|
|
- handler: {a in print("Copy to clipboard")}))
|
|
|
- actionSheet.addAction(UIAlertAction(title: "Block contact",
|
|
|
- style: .default,
|
|
|
- handler: {a in print("Block contact")}))
|
|
|
- actionSheet.addAction(UIAlertAction(title: "Delete contact",
|
|
|
- style: .destructive,
|
|
|
- handler: {a in print("Delete contact")}))
|
|
|
- actionSheet.addAction(UIAlertAction(title: "Cancel",
|
|
|
- style: .cancel,
|
|
|
- handler: {a in print("Cancel")}))
|
|
|
- present(actionSheet, animated: true, completion: nil)
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
override func didReceiveMemoryWarning() {
|
|
|
super.didReceiveMemoryWarning()
|
|
|
// Dispose of any resources that can be recreated.
|