Ver Fonte

add swipe-to-archive option

B. Petersen há 6 anos atrás
pai
commit
fe31cb543f
1 ficheiros alterados com 7 adições e 3 exclusões
  1. 7 3
      deltachat-ios/Controller/ChatListController.swift

+ 7 - 3
deltachat-ios/Controller/ChatListController.swift

@@ -167,13 +167,17 @@ extension ChatListController: UITableViewDataSource, UITableViewDelegate {
             return nil
         }
 
-        // assigning swipe by delete to chats
-        let delete = UITableViewRowAction(style: .destructive, title: String.localized("global_menu_edit_delete_desktop")) { [unowned self] _, _ in
+        let archive = UITableViewRowAction(style: .destructive, title: String.localized("menu_archive_chat")) { [unowned self] _, _ in
+        }
+        archive.backgroundColor = UIColor.gray
+
+        let delete = UITableViewRowAction(style: .destructive, title: String.localized("menu_delete_chat")) { [unowned self] _, _ in
             let chatId = chatList.getChatId(index: row)
             self.showDeleteChatConfirmationAlert(chatId: chatId)
         }
         delete.backgroundColor = UIColor.red
-        return [delete]
+
+        return [archive, delete]
     }
 }