From 4e4f479b57309198c02d2bdb8871dbb1ddb1b9ad Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Sat, 20 Feb 2021 20:31:43 +0400 Subject: [PATCH] Various fixes --- .../Sources/ChatItemGalleryFooterContentNode.swift | 2 +- .../Sources/InviteLinkQRCodeController.swift | 2 ++ .../TelegramUI/Sources/ChatMediaInputNode.swift | 12 +++++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/submodules/GalleryUI/Sources/ChatItemGalleryFooterContentNode.swift b/submodules/GalleryUI/Sources/ChatItemGalleryFooterContentNode.swift index 1f87f0b8f3..080ce62e1e 100644 --- a/submodules/GalleryUI/Sources/ChatItemGalleryFooterContentNode.swift +++ b/submodules/GalleryUI/Sources/ChatItemGalleryFooterContentNode.swift @@ -456,7 +456,7 @@ final class ChatItemGalleryFooterContentNode: GalleryFooterContentNode, UIScroll self.currentMessage = message let canDelete: Bool - var canShare = !message.containsSecretMedia && !Namespaces.Message.allScheduled.contains(message.id.namespace) + var canShare = !message.containsSecretMedia var canEdit = false for media in message.media { diff --git a/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift b/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift index b98ee3789a..aec9ecee79 100644 --- a/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift +++ b/submodules/InviteLinksUI/Sources/InviteLinkQRCodeController.swift @@ -218,6 +218,8 @@ public final class InviteLinkQRCodeController: ViewController { self.qrButtonNode = HighlightTrackingButtonNode() self.qrImageNode = TransformImageNode() + self.qrImageNode.clipsToBounds = true + self.qrImageNode.cornerRadius = 16.0 self.qrIconNode = AnimatedStickerNode() if let path = getAppBundle().path(forResource: "PlaneLogo", ofType: "tgs") { diff --git a/submodules/TelegramUI/Sources/ChatMediaInputNode.swift b/submodules/TelegramUI/Sources/ChatMediaInputNode.swift index f0989ce2df..2a2956d05c 100644 --- a/submodules/TelegramUI/Sources/ChatMediaInputNode.swift +++ b/submodules/TelegramUI/Sources/ChatMediaInputNode.swift @@ -1013,7 +1013,9 @@ final class ChatMediaInputNode: ChatInputNode { gallery.setHintWillBePresentedInPreviewingContext(true) var items: [ContextMenuItem] = [] - items.append(.action(ContextMenuActionItem(text: strongSelf.strings.MediaPicker_Send, icon: { _ in nil }, action: { _, f in + items.append(.action(ContextMenuActionItem(text: strongSelf.strings.MediaPicker_Send, icon: { theme in + return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Resend"), color: theme.actionSheet.primaryTextColor) + }, action: { _, f in f(.default) if isSaved { let _ = self?.controllerInteraction.sendGif(file.file, sourceNode, sourceRect) @@ -1022,7 +1024,9 @@ final class ChatMediaInputNode: ChatInputNode { } }))) if isSaved || isGifSaved { - items.append(.action(ContextMenuActionItem(text: strongSelf.strings.Conversation_ContextMenuDelete, textColor: .destructive, icon: { _ in nil }, action: { _, f in + items.append(.action(ContextMenuActionItem(text: strongSelf.strings.Conversation_ContextMenuDelete, textColor: .destructive, icon: { theme in + return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Delete"), color: theme.actionSheet.destructiveActionTextColor) + }, action: { _, f in f(.dismissWithoutContent) guard let strongSelf = self else { @@ -1031,7 +1035,9 @@ final class ChatMediaInputNode: ChatInputNode { let _ = removeSavedGif(postbox: strongSelf.context.account.postbox, mediaId: file.file.media.fileId).start() }))) } else if canSaveGif && !isGifSaved { - items.append(.action(ContextMenuActionItem(text: strongSelf.strings.Preview_SaveGif, icon: { _ in nil }, action: { _, f in + items.append(.action(ContextMenuActionItem(text: strongSelf.strings.Preview_SaveGif, icon: { theme in + return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Save"), color: theme.actionSheet.primaryTextColor) + }, action: { _, f in f(.dismissWithoutContent) guard let strongSelf = self else {