From a3d2ae7d5db55b3a4cacef73f8c912ed6f876fa9 Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Fri, 27 Sep 2024 10:13:52 +0200 Subject: [PATCH] Make sticker work again in iOS 18 (#2304) We should come up with a more sustainable approach. --- deltachat-ios/Chat/ChatViewController.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deltachat-ios/Chat/ChatViewController.swift b/deltachat-ios/Chat/ChatViewController.swift index 4325e5f98..4b6f3b89b 100644 --- a/deltachat-ios/Chat/ChatViewController.swift +++ b/deltachat-ios/Chat/ChatViewController.swift @@ -2747,7 +2747,10 @@ extension ChatViewController: UITextViewDelegate { // MARK: - ChatInputTextViewPasteDelegate extension ChatViewController: ChatInputTextViewPasteDelegate { func onImagePasted(image: UIImage) { - let isSticker = image.size.equalTo(CGSize(width: 140, height: 140)) + + let preiOS18StickerSize = CGSize(width: 140, height: 140) + let iOS18StickerSize = CGSize(width: 160, height: 160) + let isSticker = image.size.equalTo(preiOS18StickerSize) || image.size.equalTo(iOS18StickerSize) if isSticker { sendSticker(image)