Jelajahi Sumber

Add 'not implemented' messages when pressing buttons that do not work yet

Alla Reinsch 7 tahun lalu
induk
melakukan
9b2be3cbe0

+ 4 - 4
deltachat-ios/ChatListController.swift

@@ -90,10 +90,10 @@ class ChatListController: UIViewController {
                                                 a in
                                                 self.didPressNewChat()
         }))
-        actionSheet.addAction(UIAlertAction(title: "New group",
+        /* actionSheet.addAction(UIAlertAction(title: "New group",
                                             style: .default,
                                             handler: {a in print("New group")}))
-/*: actionSheet.addAction(UIAlertAction(title: "Scan QR code",
+actionSheet.addAction(UIAlertAction(title: "Scan QR code",
                                             style: .default,
                                             handler: {a in print("Scan QR code")}))
         actionSheet.addAction(UIAlertAction(title: "Show QR code",
@@ -101,10 +101,10 @@ class ChatListController: UIViewController {
                                             handler: {a in print("Show QR code")}))
         actionSheet.addAction(UIAlertAction(title: "Contact requests",
                                             style: .default,
-                                            handler: {a in print("Contact requests")}))*/
+                                            handler: {a in print("Contact requests")}))
         actionSheet.addAction(UIAlertAction(title: "Settings",
                                             style: .default,
-                                            handler: {a in print("Settings")}))
+                                            handler: {a in print("Settings")}))*/
         actionSheet.addAction(UIAlertAction(title: "Cancel",
                                             style: .cancel,
                                             handler: {a in print("Cancel")}))

+ 11 - 5
deltachat-ios/ContactProfileViewController.swift

@@ -37,7 +37,7 @@ class ContactProfileViewController: UITableViewController {
         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
+       // self.navigationItem.rightBarButtonItem = dotsButton
     }
 
     func displayNewChat(contactId: Int) {
@@ -107,10 +107,10 @@ class ContactProfileViewController: UITableViewController {
         if row == 2 {
             cell.textLabel?.text = "Edit name"
         }
-        if row == 3 {
+        /*if row == 3 {
             cell.textLabel?.text = "Encryption"
-        }
-        if row == 4 {
+        }*/
+        if row == 3 {
             cell.textLabel?.text = "New chat"
         }
         return cell
@@ -119,11 +119,17 @@ class ContactProfileViewController: UITableViewController {
     
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
         let row = indexPath.row
+        
+        if row == 1 {
+            let alert = UIAlertController(title: "Not implemented", message: "Settings are not implemented yet.", preferredStyle: .alert)
+            alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil))
+            present(alert, animated: true, completion: nil)
+        }
         if row == 2 {
             let newContactController = NewContactController(contactIdForUpdate: contactId)
             navigationController?.pushViewController(newContactController, animated: true)
         }
-        if row == 4 {
+        if row == 3 {
             displayNewChat(contactId: contactId)
         }
     }