Browse Source

add block-option to contact request

B. Petersen 5 years ago
parent
commit
e5757ec4e3

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

@@ -185,6 +185,9 @@ extension ChatListController: UITableViewDataSource, UITableViewDelegate {
             alert.addAction(UIAlertAction(title: String.localized("not_now"), style: .default, handler: { _ in
                 dcContact.marknoticed()
             }))
+            alert.addAction(UIAlertAction(title: String.localized("menu_block_contact"), style: .destructive, handler: { _ in
+                dcContact.block()
+            }))
             alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel))
             present(alert, animated: true, completion: nil)
         } else if chatId==DC_CHAT_ID_ARCHIVED_LINK {

+ 3 - 0
deltachat-ios/Controller/MailboxViewController.swift

@@ -52,6 +52,9 @@ class MailboxViewController: ChatViewController {
                 let chat = message.createChat()
                 self.coordinator?.showChat(chatId: chat.id)
             }))
+            alert.addAction(UIAlertAction(title: String.localized("menu_block_contact"), style: .destructive, handler: { _ in
+                dcContact.block()
+            }))
             alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel))
             present(alert, animated: true, completion: nil)
         }