Various fixes

This commit is contained in:
Ilya Laktyushin 2026-03-03 19:26:10 +04:00
parent ad0f639fb5
commit ddd336bc8f
2 changed files with 16 additions and 1 deletions

View file

@ -3067,8 +3067,10 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
var skipConcealedAlert = false
if let author = message?.author, author.isVerified {
skipConcealedAlert = true
} else if let forwardInfo = message?.forwardInfo, let author = forwardInfo.author, author.isVerified {
skipConcealedAlert = true
}
if let message, let adAttribute = message.attributes.first(where: { $0 is AdMessageAttribute }) as? AdMessageAttribute {
strongSelf.chatDisplayNode.adMessagesContext?.markAction(opaqueId: adAttribute.opaqueId, media: false, fullscreen: false)
}

View file

@ -24,6 +24,7 @@ import MultiAnimationRenderer
import TranslateUI
import ChatControllerInteraction
import LegacyChatHeaderPanelComponent
import UIKitRuntimeUtils
private enum PinnedMessageAnimation {
case slideToTop
@ -86,6 +87,16 @@ final class ChatPinnedMessageTitlePanelNode: ChatTitleAccessoryPanelNode {
private let queue = Queue()
private var captureProtected: Bool = false {
didSet {
if self.captureProtected != oldValue {
if self.isNodeLoaded {
setLayerDisableScreenshots(self.contentContainer.layer, self.captureProtected)
}
}
}
}
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
if let buttonResult = self.buttonsContainer.hitTest(point.offsetBy(dx: -self.buttonsContainer.frame.minX, dy: -self.buttonsContainer.frame.minY), with: event) {
return buttonResult
@ -281,6 +292,8 @@ final class ChatPinnedMessageTitlePanelNode: ChatTitleAccessoryPanelNode {
}
self.isReplyThread = isReplyThread
self.captureProtected = interfaceState.copyProtectionEnabled || interfaceState.myCopyProtectionEnabled
self.contextContainer.isGestureEnabled = !isReplyThread
var actionTitle: String?