diff --git a/deltachat-ios/Chat/Views/FileView.swift b/deltachat-ios/Chat/Views/FileView.swift index bca194ccb..350e4a084 100644 --- a/deltachat-ios/Chat/Views/FileView.swift +++ b/deltachat-ios/Chat/Views/FileView.swift @@ -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 { @@ -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