Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions deltachat-ios/Chat/Views/FileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,15 @@ public class FileView: UIView {
let isPrvFile = filename.hasSuffix(".prv")
fileSubtitle.text = isPrvFile ? "\(sizeText) PRV" : sizeText

// Bell icon visibility logic (matches Android DocumentView.java)
// Bell icon: ALWAYS visible for outgoing .prv files (owner can manage access)
// Bell icon visibility logic (matches Android ConversationItem.java lines 569, 616-639)
// Android logic: hideBellForForwarder = isOutgoing && isForwarded
// Bell shows if: (isOutgoing && !hideBellForForwarder) OR (!isOutgoing && !isForwarded)
// In other words: Hide bell if message is forwarded (regardless of incoming/outgoing)
// This ensures bell shows on forwarder's original chat (chatId 12) but not on forwarded copies (chatId 13)
// Red badge: Only shows when status is WAITING_OWNER_ACTION (matches Android)
let isOutgoing = message.isFromCurrentSender
let isForwarded = message.isForwarded
let hideBellForForwarder = isOutgoing && isForwarded
var hasPendingRequests = false

if let status = status {
Expand All @@ -306,8 +311,13 @@ public class FileView: UIView {
hasPendingRequests = isWaitingOwnerAction || hasPendingForwarded
}

// Bell icon: Always visible for outgoing .prv files (matches Android)
bellIconView.isHidden = !isOutgoing
// Bell icon logic (matches Android):
// - Show for outgoing .prv files that are NOT forwarded (original file location - chatId 12)
// - Hide for outgoing forwarded files (hideBellForForwarder = true) - forwarded copy in chatId 13 from forwarder's view
// - Show for incoming .prv files that are NOT forwarded
// - Hide for incoming forwarded files - forwarded copy in chatId 13 from forwardee's view
let shouldShowBell = isPrvFile && ((isOutgoing && !hideBellForForwarder) || (!isOutgoing && !isForwarded))
bellIconView.isHidden = !shouldShowBell

// Red badge: Only show when there are pending WAITING_OWNER_ACTION requests
notificationBadge.isHidden = !hasPendingRequests
Expand Down
Loading