Skip to content

Commit

Permalink
no private replies to info-messages
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
r10s committed Jan 31, 2025
1 parent 89a7099 commit b8bb25d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8bb25d

Please sign in to comment.