Sfoglia il codice sorgente

refactoring / code removal

Jonas Reinsch 7 anni fa
parent
commit
f1f74766c5

+ 0 - 26
deltachat-ios/ContactProfileViewController.swift

@@ -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.

+ 1 - 1
deltachat-ios/GroupNameController.swift

@@ -78,7 +78,7 @@ class GroupNameController: UIViewController {
 
 extension GroupNameController: UITextFieldDelegate {
     func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
-        let text = (textField.text! as! NSString).replacingCharacters(in: range, with: string)
+        let text = (textField.text! as NSString).replacingCharacters(in: range, with: string)
         groupName = text
         
         return true