ソースを参照

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

no swipe-to-reply if one cannot send to chat
cyBerta 4 年 前
コミット
4d2b3a868b
1 ファイル変更4 行追加0 行削除
  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])