Update ad close button

This commit is contained in:
Isaac
2024-02-06 15:27:36 +04:00
parent 7e42a9cc12
commit 98ebf6ddb4
7 changed files with 120 additions and 70 deletions

View File

@@ -65,7 +65,10 @@ public class ChatMessageShareButton: HighlightableButtonNode {
var updatedIconImage: UIImage?
var updatedIconOffset = CGPoint()
if case .pinnedMessages = subject {
if message.adAttribute != nil {
updatedIconImage = PresentationResourcesChat.chatFreeCloseButtonIcon(presentationData.theme.theme, wallpaper: presentationData.theme.wallpaper)
updatedIconOffset = CGPoint(x: UIScreenPixel, y: UIScreenPixel)
} else if case .pinnedMessages = subject {
updatedIconImage = PresentationResourcesChat.chatFreeNavigateButtonIcon(presentationData.theme.theme, wallpaper: presentationData.theme.wallpaper)
updatedIconOffset = CGPoint(x: UIScreenPixel, y: 1.0)
} else if isReplies {