瀏覽代碼

change order of new group/new contact

Alla Reinsch 7 年之前
父節點
當前提交
c35f21e571
共有 1 個文件被更改,包括 9 次插入10 次删除
  1. 9 10
      deltachat-ios/NewChatViewController.swift

+ 9 - 10
deltachat-ios/NewChatViewController.swift

@@ -55,28 +55,27 @@ class NewChatViewController: UITableViewController {
     override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         let row = indexPath.row
         if row == 0 {
-            // new contact row
+            // new group row
             let cell:UITableViewCell
             if let c = tableView.dequeueReusableCell(withIdentifier: "newContactCell") {
                 cell = c
             } else {
                 cell = UITableViewCell(style: .default, reuseIdentifier: "newContactCell")
             }
-            cell.textLabel?.text = "New Contact"
+            cell.textLabel?.text = "New Group"
             cell.textLabel?.textColor = self.view.tintColor
-
-
+            
             return cell
         }
         if row == 1 {
-            // new group row
+            // new contact row
             let cell:UITableViewCell
             if let c = tableView.dequeueReusableCell(withIdentifier: "newContactCell") {
                 cell = c
             } else {
                 cell = UITableViewCell(style: .default, reuseIdentifier: "newContactCell")
             }
-            cell.textLabel?.text = "New Group"
+            cell.textLabel?.text = "New Contact"
             cell.textLabel?.textColor = self.view.tintColor
             
             return cell
@@ -106,13 +105,13 @@ class NewChatViewController: UITableViewController {
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
         let row = indexPath.row
         if row == 0 {
-            let newContactController = NewContactController()
-            navigationController?.pushViewController(newContactController, animated: true)
-        }
-        if row == 1 {
             let newGroupController = NewGroupViewController()
             navigationController?.pushViewController(newGroupController, animated: true)
         }
+        if row == 1 {
+            let newContactController = NewContactController()
+            navigationController?.pushViewController(newContactController, animated: true)
+        }
         if row > 1 {
             let contactIndex = row - 2
             let contactId = contactIds[contactIndex]