Selaa lähdekoodia

Merge pull request #1005 from deltachat/no-swipe-reply-in-readonly

no swipe-to-reply if one cannot send to chat
cyBerta 4 vuotta sitten
vanhempi
commit
4d2b3a868b
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      deltachat-ios/Chat/ChatViewController.swift

+ 4 - 0
deltachat-ios/Chat/ChatViewController.swift

@@ -421,6 +421,10 @@ class ChatViewController: UITableViewController {
     }
 
     override func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
+        if disableWriting {
+            return nil
+        }
+
         let action = UIContextualAction(style: .normal, title: nil,
                                         handler: { (_, _, completionHandler) in
                                             let message = DcMsg(id: self.messageIds[indexPath.row])