Browse Source

rename attachmentAction to chatOption

B. Petersen 5 years ago
parent
commit
6cb834f06c

+ 6 - 6
deltachat-ios/Controller/ContactDetailViewController.swift

@@ -137,7 +137,7 @@ class ContactDetailViewController: UITableViewController {
         let cellType = viewModel.typeFor(section: indexPath.section)
         switch cellType {
         case .chatOptions:
-            switch viewModel.attachmentActionFor(row: row) {
+            switch viewModel.chatOptionFor(row: row) {
             case .documents:
                 return documentsCell
             case .gallery:
@@ -171,9 +171,9 @@ class ContactDetailViewController: UITableViewController {
         let type = viewModel.typeFor(section: indexPath.section)
         switch type {
         case .chatOptions:
-            handleAttachmentAction(for: indexPath.row)
+            handleChatOption(for: indexPath.row)
         case .chatActions:
-            handleCellAction(for: indexPath.row)
+            handleChatAction(for: indexPath.row)
         case .sharedChats:
             let chatId = viewModel.getSharedChatIdAt(indexPath: indexPath)
             showChat(chatId: chatId)
@@ -210,7 +210,7 @@ class ContactDetailViewController: UITableViewController {
     }
 
     // MARK: - actions
-    private func handleCellAction(for index: Int) {
+    private func handleChatAction(for index: Int) {
         let action = viewModel.chatActionFor(row: index)
         switch action {
         case .archiveChat:
@@ -222,8 +222,8 @@ class ContactDetailViewController: UITableViewController {
         }
     }
 
-    private func handleAttachmentAction(for index: Int) {
-        let action = viewModel.attachmentActionFor(row: index)
+    private func handleChatOption(for index: Int) {
+        let action = viewModel.chatOptionFor(row: index)
         switch action {
         case .documents:
             showDocuments()

+ 1 - 1
deltachat-ios/ViewModel/ContactDetailViewModel.swift

@@ -69,7 +69,7 @@ class ContactDetailViewModel {
         return chatActions[row]
     }
 
-    func attachmentActionFor(row: Int) -> ContactDetailViewModel.ChatOption {
+    func chatOptionFor(row: Int) -> ContactDetailViewModel.ChatOption {
         return chatOptions[row]
     }