From b8bb25d574c26cfb4de5bb23a13d145218c9f629 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Fri, 31 Jan 2025 14:40:51 +0100 Subject: [PATCH] no private replies to info-messages this is what android does as well. one could allow that partly, eg. if an info-messages has a sender, but that's probably more confusing. --- deltachat-ios/Chat/ChatViewController.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deltachat-ios/Chat/ChatViewController.swift b/deltachat-ios/Chat/ChatViewController.swift index 50150c510..36a7428e2 100644 --- a/deltachat-ios/Chat/ChatViewController.swift +++ b/deltachat-ios/Chat/ChatViewController.swift @@ -957,12 +957,16 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate { self.reloadData() } + private func isMarkerOrInfo(_ message: DcMsg) -> Bool { + return message.id == DC_MSG_ID_MARKER1 || message.id == DC_MSG_ID_DAYMARKER || message.isInfo || message.type == DC_MSG_VIDEOCHAT_INVITATION + } + private func canReply(to message: DcMsg) -> Bool { - return message.id != DC_MSG_ID_MARKER1 && message.id != DC_MSG_ID_DAYMARKER && !message.isInfo && message.type != DC_MSG_VIDEOCHAT_INVITATION && dcChat.canSend + return !isMarkerOrInfo(message) && dcChat.canSend } private func canReplyPrivately(to message: DcMsg) -> Bool { - return dcChat.isGroup && !message.isFromCurrentSender + return !isMarkerOrInfo(message) && dcChat.isGroup && !message.isFromCurrentSender } /// Verifies if the last message cell is fully visible